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

Unified Diff: include/core/SkSurface.h

Issue 1210303003: add getTextureHandle to SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak dox Created 5 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.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 8ccfa311245bcf7bc63e9f5aabb8f6124c892317..5d08ee67d30e6302e4a21e365b38ca8e96a366f3 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -138,9 +138,25 @@ public:
/**
* Call this if the contents are about to change. This will (lazily) force a new
* value to be returned from generationID() when it is called next.
+ *
+ * CAN WE DEPRECATE THIS?
*/
void notifyContentWillChange(ContentChangeMode mode);
+ enum TextureHandleAccess {
+ kFlushRead_TextureHandleAccess, //!< caller may read from the texture
+ kFlushWrite_TextureHandleAccess, //!< caller may write to the texture
+ kDiscardWrite_TextureHandleAccess, //!< caller must over-write the entire texture
+ };
+ /**
+ * Retrieves the backend API handle of the texture used by this surface, or 0 if the surface
+ * is not backed by a GPU texture.
+ *
+ * The returned texture-handle is only valid until the next draw-call into the surface,
+ * or the surface is deleted.
+ */
+ GrBackendObject getTextureHandle(TextureHandleAccess);
+
/**
* Return a canvas that will draw into this surface. This will always
* return the same canvas for a given surface, and is manged/owned by the
« no previous file with comments | « no previous file | src/image/SkSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698