8 #ifndef SkRasterHandleAllocator_DEFINED
9 #define SkRasterHandleAllocator_DEFINED
47 void (*fReleaseProc)(
void* pixels,
void* ctx);
79 static std::unique_ptr<SkCanvas>
MakeCanvas(std::unique_ptr<SkRasterHandleAllocator>,
89 friend class SkBitmapDevice;
SkBitmap describes a two-dimensional raster pixel array.
Definition: SkBitmap.h:59
SkCanvas provides an interface for drawing, and how the drawing is clipped and transformed.
Definition: SkCanvas.h:99
SkMatrix holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:53
If a client wants to control the allocation of raster layers in a canvas, it should subclass SkRaster...
Definition: SkRasterHandleAllocator.h:37
static std::unique_ptr< SkCanvas > MakeCanvas(std::unique_ptr< SkRasterHandleAllocator >, const SkImageInfo &, const Rec *rec=nullptr, const SkSurfaceProps *props=nullptr)
This creates a canvas which will use the allocator to manage pixel allocations, including all calls t...
SkRasterHandleAllocator()=default
SkRasterHandleAllocator & operator=(const SkRasterHandleAllocator &)=delete
virtual void updateHandle(Handle, const SkMatrix &, const SkIRect &)=0
Clients access the handle for a given layer by calling SkCanvas::accessTopRasterHandle().
virtual ~SkRasterHandleAllocator()=default
virtual bool allocHandle(const SkImageInfo &, Rec *)=0
Given a requested info, allocate the corresponding pixels/rowbytes, and whatever handle is desired to...
void * Handle
Definition: SkRasterHandleAllocator.h:42
SkRasterHandleAllocator(const SkRasterHandleAllocator &)=delete
Describes properties and constraints of a given SkSurface.
Definition: SkSurfaceProps.h:52
SkIRect holds four 32-bit integer coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:32
Describes pixel dimensions and encoding.
Definition: SkImageInfo.h:194
Definition: SkRasterHandleAllocator.h:44
Handle fHandle
Definition: SkRasterHandleAllocator.h:51
size_t fRowBytes
Definition: SkRasterHandleAllocator.h:50
void * fPixels
Definition: SkRasterHandleAllocator.h:49
void * fReleaseCtx
Definition: SkRasterHandleAllocator.h:48