// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System;
using System.Collections.Generic;
namespace SixLabors.ImageSharp.Drawing.Processing.Backends {
///
/// Retained scene created by the CPU drawing backend.
///
public sealed class DefaultDrawingBackendScene : DrawingBackendScene
{
///
/// Initializes a new instance of the class.
///
/// The retained CPU flush scene.
/// The target bounds used to create the scene.
/// Resources that must stay alive for the retained scene.
internal DefaultDrawingBackendScene(
FlushScene scene,
Rectangle bounds,
IReadOnlyList? ownedResources)
: base(bounds, ownedResources)
=> this.Scene = scene;
///
/// Gets the retained CPU flush scene when this is a leaf scene.
///
internal FlushScene? Scene { get; }
///
protected override void DisposeCore()
=> this.Scene?.Dispose();
}
}