@@ -54,12 +54,6 @@ public sealed partial class DrawingCanvas<TPixel> : IDrawingCanvas
5454 /// </summary>
5555 private readonly List < Image < TPixel > > pendingImageResources = [ ] ;
5656
57- /// <summary>
58- /// Indicates whether this canvas is the root owner of the target frame.
59- /// Only the root canvas releases backend resources on dispose.
60- /// </summary>
61- private readonly bool isRoot ;
62-
6357 /// <summary>
6458 /// Tracks whether this instance has already been disposed.
6559 /// </summary>
@@ -135,14 +129,12 @@ internal DrawingCanvas(
135129 /// <param name="targetFrame">The destination frame.</param>
136130 /// <param name="batcher">The command batcher used for deferred composition.</param>
137131 /// <param name="defaultState">The default state used when no scoped state is active.</param>
138- /// <param name="isRoot">Whether this canvas is the root owner of the target frame.</param>
139132 private DrawingCanvas (
140133 Configuration configuration ,
141134 IDrawingBackend backend ,
142135 ICanvasFrame < TPixel > targetFrame ,
143136 DrawingCanvasBatcher < TPixel > batcher ,
144- DrawingCanvasState defaultState ,
145- bool isRoot )
137+ DrawingCanvasState defaultState )
146138 {
147139 Guard . NotNull ( configuration , nameof ( configuration ) ) ;
148140 Guard . NotNull ( backend , nameof ( backend ) ) ;
@@ -159,7 +151,6 @@ private DrawingCanvas(
159151 this . backend = backend ;
160152 this . targetFrame = targetFrame ;
161153 this . batcher = batcher ;
162- this . isRoot = isRoot ;
163154
164155 // Canvas coordinates are local to the current frame; origin stays at (0,0).
165156 this . Bounds = new Rectangle ( 0 , 0 , targetFrame . Bounds . Width , targetFrame . Bounds . Height ) ;
@@ -1252,7 +1243,7 @@ private static IPath FlattenAndTransform(IPath path, Matrix4x4 matrix)
12521243 }
12531244
12541245 RectangleF totalBounds = new ( minX , minY , maxX - minX , maxY - minY ) ;
1255- return new PreFlattenedCompositePath ( subPaths . ToArray ( ) , totalBounds ) ;
1246+ return new PreFlattenedCompositePath ( [ .. subPaths ] , totalBounds ) ;
12561247 }
12571248
12581249 /// <summary>
0 commit comments