Skia
2D Graphics Library
|
Subclass of SkBitmap::Allocator that returns a SkPixelRef that allocates its pixel memory from the heap. More...
#include <SkBitmap.h>
Public Member Functions | |
bool | allocPixelRef (SkBitmap *bitmap) override |
Allocates the pixel memory for the bitmap, given its dimensions and SkColorType. More... | |
Subclass of SkBitmap::Allocator that returns a SkPixelRef that allocates its pixel memory from the heap.
This is the default SkBitmap::Allocator invoked by allocPixels().
|
override |
Allocates the pixel memory for the bitmap, given its dimensions and SkColorType.
Returns true on success, where success means either setPixels() or setPixelRef() was called.
bitmap | SkBitmap containing SkImageInfo as input, and SkPixelRef as output |
example: https://fiddle.skia.org/c/@Bitmap_HeapAllocator_allocPixelRef