Flutter Engine
The Flutter Engine
|
#include <SkPixelRef.h>
Public Member Functions | |
SkPixelRef (int width, int height, void *addr, size_t rowBytes) | |
~SkPixelRef () override | |
SkISize | dimensions () const |
int | width () const |
int | height () const |
void * | pixels () const |
size_t | rowBytes () const |
uint32_t | getGenerationID () const |
void | notifyPixelsChanged () |
bool | isImmutable () const |
void | setImmutable () |
void | addGenIDChangeListener (sk_sp< SkIDChangeListener > listener) |
void | notifyAddedToCache () |
virtual SkDiscardableMemory * | diagnostic_only_getDiscardable () const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Protected Member Functions | |
void | android_only_reset (int width, int height, size_t rowBytes) |
Friends | |
class | SkSurface_Raster |
void | SkBitmapCache_setImmutableWithID (SkPixelRef *, uint32_t) |
This class is the smart container for pixel memory, and is used with SkBitmap. This class can be shared/accessed between multiple threads.
Definition at line 28 of file SkPixelRef.h.
|
override |
Definition at line 43 of file SkPixelRef.cpp.
void SkPixelRef::addGenIDChangeListener | ( | sk_sp< SkIDChangeListener > | listener | ) |
Definition at line 78 of file SkPixelRef.cpp.
Definition at line 48 of file SkPixelRef.cpp.
|
inlinevirtual |
Definition at line 80 of file SkPixelRef.h.
|
inline |
Definition at line 33 of file SkPixelRef.h.
uint32_t SkPixelRef::getGenerationID | ( | ) | const |
Returns a non-zero, unique value corresponding to the pixels in this pixelref. Each time the pixels are changed (and notifyPixelsChanged is called), a different generation ID will be returned.
Definition at line 63 of file SkPixelRef.cpp.
|
inline |
Definition at line 35 of file SkPixelRef.h.
|
inline |
Returns true if this pixelref is marked as immutable, meaning that the contents of its pixels will not change for the lifetime of the pixelref.
Definition at line 55 of file SkPixelRef.h.
|
inline |
Definition at line 76 of file SkPixelRef.h.
void SkPixelRef::notifyPixelsChanged | ( | ) |
Call this if you have changed the contents of the pixels. This will in- turn cause a different generation ID value to be returned from getGenerationID().
Definition at line 102 of file SkPixelRef.cpp.
|
inline |
Definition at line 36 of file SkPixelRef.h.
|
inline |
Definition at line 37 of file SkPixelRef.h.
void SkPixelRef::setImmutable | ( | ) |
Marks this pixelref is immutable, meaning that the contents of its pixels will not change for the lifetime of the pixelref. This state can be set on a pixelref, but it cannot be cleared once it is set.
Definition at line 112 of file SkPixelRef.cpp.
|
inline |
Definition at line 34 of file SkPixelRef.h.
|
friend |
Definition at line 70 of file SkBitmapCache.cpp.
|
friend |
Definition at line 111 of file SkPixelRef.h.