PeachDrawing.Skia.SkiaCanvas
SkiaCanvas.CreateRetainedLayer(Rect) Method
Begins a RetainedLayer: a group of drawing recorded once that can be drawn many times, each with its own opacity and under the transform this canvas has then. A canvas backed by a GPU keeps it as a texture, so drawing it again costs a composite and not a repaint.
public override PeachDrawing.Core.RetainedLayer? CreateRetainedLayer(PeachDrawing.Core.Rect bounds);
Parameters
bounds Rect
the region the layer covers, in this canvas’s coordinates
Returns
RetainedLayer
the layer, or null when this canvas cannot make one (as with CreateTile(double, double)); the caller then
paints straight onto this canvas each time
Remarks
The default builds the layer from CreateTile(double, double), so it works on any canvas; a canvas with a better way overrides it.