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

Unified Diff: include/core/SkSurface.h

Issue 1210303003: add getTextureHandle to SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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') | src/image/SkSurface_Gpu.cpp » ('J')
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 de84766647d993618c814e75a6bc216edd8e2e62..7815f68efb950822c15b01160e0f2562d0ac489e 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -140,10 +140,21 @@ 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?
Justin Novosad 2015/06/26 21:33:14 No we can't. This API drives an important optimiza
reed1 2015/06/27 17:56:11 Lets discuss as part of DeferredCanvas discussion
*/
void notifyContentWillChange(ContentChangeMode mode);
/**
+ * Retrieves the backend API handle of the texture used by this surface, or 0 if the surface
+ * is not backed by a GPU texture.
+ *
+ * If flushPendingWrites then the GrContext will issue to the backend API any deferred
bsalomon 2015/06/26 21:15:22 comment looks incorrect
reed1 2015/06/26 21:21:13 Doh
+ * read operations on the texture before returning.
+ */
+ GrBackendObject getTextureHandle(ContentChangeMode);
f(malita) 2015/06/26 21:39:38 Can you also document the lifetime & ownership for
reed1 2015/06/27 17:56:11 Done.
+
+ /**
* 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
* surface. It should not be used when its parent surface has gone out of
« no previous file with comments | « no previous file | src/image/SkSurface.cpp » ('j') | src/image/SkSurface_Gpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698