Flutter Engine
The Flutter Engine
|
Public Member Functions | |
SkiaAllocator () | |
bool | allocHandle (const SkImageInfo &info, Rec *rec) override |
void | updateHandle (Handle hndl, const SkMatrix &ctm, const SkIRect &clip) override |
Public Member Functions inherited from SkRasterHandleAllocator | |
virtual | ~SkRasterHandleAllocator ()=default |
virtual bool | allocHandle (const SkImageInfo &, Rec *)=0 |
virtual void | updateHandle (Handle, const SkMatrix &, const SkIRect &)=0 |
Additional Inherited Members | |
Public Types inherited from SkRasterHandleAllocator | |
typedef void * | Handle |
Static Public Member Functions inherited from SkRasterHandleAllocator | |
static std::unique_ptr< SkCanvas > | MakeCanvas (std::unique_ptr< SkRasterHandleAllocator >, const SkImageInfo &, const Rec *rec=nullptr, const SkSurfaceProps *props=nullptr) |
Protected Member Functions inherited from SkRasterHandleAllocator | |
SkRasterHandleAllocator ()=default | |
SkRasterHandleAllocator (const SkRasterHandleAllocator &)=delete | |
SkRasterHandleAllocator & | operator= (const SkRasterHandleAllocator &)=delete |
Definition at line 59 of file rasterhandleallocator.cpp.
|
inline |
Definition at line 61 of file rasterhandleallocator.cpp.
|
inlineoverridevirtual |
Given a requested info, allocate the corresponding pixels/rowbytes, and whatever handle is desired to give clients access to those pixels. The rec also contains a proc and context which will be called when this allocation goes out of scope.
e.g. when canvas->saveLayer() is called, the allocator will be called to allocate the pixels for the layer. When canvas->restore() is called, the fReleaseProc will be called.
Implements SkRasterHandleAllocator.
Definition at line 63 of file rasterhandleallocator.cpp.
|
inlineoverridevirtual |
Clients access the handle for a given layer by calling SkCanvas::accessTopRasterHandle(). To allow the handle to reflect the current matrix/clip in the canvs, updateHandle() is is called. The subclass is responsible to update the handle as it sees fit.
Implements SkRasterHandleAllocator.
Definition at line 81 of file rasterhandleallocator.cpp.