Table of Contents

Enum SkiaCacheType

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll
public enum SkiaCacheType
Extension Methods

Fields

GPU = 6

The cached surface will use the same graphic context as your hardware-accelerated canvas. This kind of cache will not apply Opacity as not all platforms support transparency for hardware accelerated layer. Will fallback to simple Image cache type if hardware acceleration is not available.

Image = 3

Will use simple SKBitmap cache type, will not use hardware acceleration. Slower but will work for sizes bigger than graphics memory if needed.

ImageComposite = 5

Would receive the invalidated area rectangle, then redraw the previous cache but clipped to exclude the dirty area, then would re-create the dirty area and draw it clipped inside the dirty rectangle. This is useful for layouts with many children, like scroll content etc, but useless for non-containers. But will suffer from children that love to invalidate parent much!

ImageDoubleBuffered = 4

Using Image cache type with double buffering. Will display a previous cache while rendering the new one in background, thus not slowing scrolling etc.

None = 0

True and old school

Operations = 1

Create and reuse SKPicture. Try this first for labels, svg etc. Do not use this when dropping shadows or with other effects, better use Bitmap.

OperationsFull = 2

This records operations out of the controls destination, up to canvas limits. If you would need to offset cache later (ex: animate inside scroll) you must cache parent (ex: with simple Operations) to record this one within virtual parent canvas. Try this first for labels, svg etc. Do not use this when dropping shadows or with other effects, better use Bitmap.