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 |