This class is the smart container for pixel memory, and is used with SkBitmap.
More...
#include <SkPixelRef.h>
This class is the smart container for pixel memory, and is used with SkBitmap.
This class can be shared/accessed between multiple threads.
◆ SkPixelRef()
SkPixelRef::SkPixelRef |
( |
int |
width, |
|
|
int |
height, |
|
|
void * |
addr, |
|
|
size_t |
rowBytes |
|
) |
| |
◆ ~SkPixelRef()
SkPixelRef::~SkPixelRef |
( |
| ) |
|
|
override |
◆ addGenIDChangeListener()
void SkPixelRef::addGenIDChangeListener |
( |
sk_sp< SkIDChangeListener > |
listener | ) |
|
◆ android_only_reset()
void SkPixelRef::android_only_reset |
( |
int |
width, |
|
|
int |
height, |
|
|
size_t |
rowBytes |
|
) |
| |
|
protected |
◆ diagnostic_only_getDiscardable()
virtual SkDiscardableMemory* SkPixelRef::diagnostic_only_getDiscardable |
( |
| ) |
const |
|
inlinevirtual |
◆ dimensions()
SkISize SkPixelRef::dimensions |
( |
| ) |
const |
|
inline |
◆ getGenerationID()
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.
◆ height()
int SkPixelRef::height |
( |
| ) |
const |
|
inline |
◆ isImmutable()
bool SkPixelRef::isImmutable |
( |
| ) |
const |
|
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.
◆ notifyAddedToCache()
void SkPixelRef::notifyAddedToCache |
( |
| ) |
|
|
inline |
◆ notifyPixelsChanged()
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().
◆ pixels()
void* SkPixelRef::pixels |
( |
| ) |
const |
|
inline |
◆ ref()
void SkRefCntBase::ref |
( |
| ) |
const |
|
inlineinherited |
Increment the reference count.
Must be balanced by a call to unref().
◆ rowBytes()
size_t SkPixelRef::rowBytes |
( |
| ) |
const |
|
inline |
◆ setImmutable()
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.
◆ unique()
bool SkRefCntBase::unique |
( |
| ) |
const |
|
inlineinherited |
May return true if the caller is the only owner.
Ensures that all previous owner's actions are complete.
◆ unref()
void SkRefCntBase::unref |
( |
| ) |
const |
|
inlineinherited |
Decrement the reference count.
If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.
◆ width()
int SkPixelRef::width |
( |
| ) |
const |
|
inline |
◆ SkBitmapCache_setImmutableWithID
void SkBitmapCache_setImmutableWithID |
( |
SkPixelRef * |
, |
|
|
uint32_t |
|
|
) |
| |
|
friend |
◆ SkSurface_Raster
friend class SkSurface_Raster |
|
friend |
The documentation for this class was generated from the following file: