Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3521)

Unified Diff: include/core/SkSurface.h

Issue 351373005: add SkSurface::NewRasterDirectReleaseProc (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/image/SkSurface_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkSurface.h
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index d049d8c04091af757d948bbb6aed397f9702feb6..68d4702cb51d6f9bfdf8b73d01e1f2d5d3221094 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -38,6 +38,14 @@ public:
static SkSurface* NewRasterDirect(const SkImageInfo&, void* pixels, size_t rowBytes);
/**
+ * The same as NewRasterDirect, but also accepts a call-back routine, which is invoked
+ * when the surface is deleted, and is passed the pixel memory and the specified context.
+ */
+ static SkSurface* NewRasterDirectReleaseProc(const SkImageInfo&, void* pixels, size_t rowBytes,
+ void (*releaseProc)(void* pixels, void* context),
+ void* context);
+
+ /**
* Return a new surface, with the memory for the pixels automatically
* allocated.
*
« no previous file with comments | « no previous file | src/image/SkSurface_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698