Flutter Engine
The Flutter Engine
|
#include <SkBitmap.h>
Public Member Functions | |
bool | allocPixelRef (SkBitmap *bitmap) override |
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().
Definition at line 1233 of file SkBitmap.h.
|
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
We explicitly use the same allocator for our pixels that SkMask does, so that we can freely assign memory allocated by one class to the other.
Definition at line 377 of file SkBitmap.cpp.