diff options
author | 2015-01-29 13:52:13 -0800 | |
---|---|---|
committer | 2015-01-29 13:52:13 -0800 | |
commit | 527b28732d0366373cdf4c3c3c496c7500523e74 (patch) | |
tree | 59f3cf5ab20d6cd648037a397597fbe8b23b658c /include/core/SkMallocPixelRef.h | |
parent | c778904a5b686617ad7fdec850ddc21e103dca0f (diff) |
Update comment for SkMallocPixelRef::NewWithProc.
Add a comment about using a NULL ReleaseProc.
BUG=skia:2185
Review URL: https://codereview.chromium.org/885573005
Diffstat (limited to 'include/core/SkMallocPixelRef.h')
-rw-r--r-- | include/core/SkMallocPixelRef.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/core/SkMallocPixelRef.h b/include/core/SkMallocPixelRef.h index 259692da64..4cb187597e 100644 --- a/include/core/SkMallocPixelRef.h +++ b/include/core/SkMallocPixelRef.h @@ -50,6 +50,11 @@ public: * * This pixelref will ref() the specified colortable (if not NULL). * + * 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. */ typedef void (*ReleaseProc)(void* addr, void* context); |