Chromium Code Reviews| Index: include/core/SkSurface.h |
| diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h |
| index 5d08ee67d30e6302e4a21e365b38ca8e96a366f3..0ef56544ee3a3ef0397411fef08128b6886c4e23 100644 |
| --- a/include/core/SkSurface.h |
| +++ b/include/core/SkSurface.h |
| @@ -143,10 +143,10 @@ public: |
| */ |
| 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 |
| + enum BackendHandleAccess { |
| + kFlushRead_BackendHandleAccess, //!< caller may read from the backend object |
| + kFlushWrite_BackendHandleAccess, //!< caller may write to the backend object |
| + kDiscardWrite_BackendHandleAccess, //!< caller must over-write the entire backend object |
| }; |
| /** |
| * Retrieves the backend API handle of the texture used by this surface, or 0 if the surface |
| @@ -155,7 +155,15 @@ public: |
| * The returned texture-handle is only valid until the next draw-call into the surface, |
| * or the surface is deleted. |
| */ |
| - GrBackendObject getTextureHandle(TextureHandleAccess); |
| + GrBackendObject getTextureHandle(BackendHandleAccess); |
| + |
| + /** |
| + * Retrieves the backend API handle of the RenderTarget backing this surface. Callers must |
|
robertphillips
2015/07/06 15:29:02
return -> returns ?
|
| + * ensure this function return 'true' or else the GrBackendObject will be invalid |
| + * |
|
robertphillips
2015/07/06 15:29:02
On -> In ?
|
| + * On OpenGL this will return the FramebufferObject ID. |
| + */ |
| + bool getRenderTargetHandle(GrBackendObject*, BackendHandleAccess); |
| /** |
| * Return a canvas that will draw into this surface. This will always |