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

Unified Diff: include/gpu/GrTypes.h

Issue 1810323002: Cache render targets that render to wrapped textures Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
Index: include/gpu/GrTypes.h
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 3def9aaa993df434948afe15cf8263d655f42776..51bd26cd52a4a2d4f15f9876538f6bf36d367454 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -412,6 +412,23 @@ GR_MAKE_BITFIELD_OPS(GrSurfaceFlags)
// opaque type for 3D API object handles
typedef intptr_t GrBackendObject;
+enum class GrBackendObjectLifeCycle {
+ /**
+ * The resource is created, owned and freed by Skia.
+ */
+ kInternal,
+ /**
+ * An external resource with ownership transfered into Skia. Skia will free the resource.
+ */
+ kAdopted,
+ /**
+ * An external resource, but Skia does not manage the lifetime of the underlying backend
+ * 3D API object(s). The client is responsible for freeing those. Used to inject client-
+ * created GPU resources into Skia (e.g. to render to a client-created texture).
+ */
+ kBorrowed
+};
+
/**
* Some textures will be stored such that the upper and left edges of the content meet at the
* the origin (in texture coord space) and for other textures the lower and left edges meet at

Powered by Google App Engine
This is Rietveld 408576698