Flutter Engine
The Flutter Engine
|
#include "include/core/SkPixelRef.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkDebug.h"
#include "src/core/SkBitmapCache.h"
#include "src/core/SkNextID.h"
#include "src/core/SkPixelRefPriv.h"
#include <atomic>
#include <utility>
Go to the source code of this file.
Functions | |
sk_sp< SkPixelRef > | SkMakePixelRefWithProc (int width, int height, size_t rowBytes, void *addr, void(*releaseProc)(void *addr, void *ctx), void *ctx) |
sk_sp< SkPixelRef > SkMakePixelRefWithProc | ( | int | w, |
int | h, | ||
size_t | rowBytes, | ||
void * | addr, | ||
void(*)(void *addr, void *ctx) | releaseProc, | ||
void * | ctx | ||
) |
Return a new SkMallocPixelRef with the provided pixel storage and rowBytes. On destruction, ReleaseProc will be called.
If ReleaseProc is NULL, the pixels will never be released. This can be useful if the pixels were stack allocated. However, such an SkMallocPixelRef must not live beyond its pixels (e.g. by copying an SkBitmap pointing to it, or drawing to an SkPicture).
Returns NULL on failure.
Definition at line 137 of file SkPixelRef.cpp.