Chromium Code Reviews| Index: include/core/SkSurface.h |
| diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h |
| index 8ccfa311245bcf7bc63e9f5aabb8f6124c892317..1576148b00f17f10aa586aa957413cff354bc388 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 may over-write the entire texture |
|
Justin Novosad
2015/06/27 19:31:37
For discard: "may over-write" -> "will over-write"
reed1
2015/06/29 14:30:01
Yes, will add more/stronger dox
|
| + }; |
| + /** |
| + * 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 |