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

Unified Diff: src/gpu/GrGpuResourceCacheAccess.h

Issue 1187523005: Add support for creating texture backed images where Skia will delete the texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add default param to support Chrome's current callers 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 | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuResourceCacheAccess.h
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h
index 4f38fc600212a5d483751f3b7374497cffc17b68..611d43b9a12d8c38acc6dd5a830b48b421af9894 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -33,7 +33,19 @@ private:
/**
* Is the resource object wrapping an externally allocated GPU resource?
*/
- bool isWrapped() const { return GrGpuResource::kWrapped_LifeCycle == fResource->fLifeCycle; }
+ bool isExternal() const { return fResource->isExternal(); }
+
+ /**
+ * Is the resource object wrapping an externally allocated GPU resource that Skia has not taken
+ * ownership of.
+ */
+ bool isBorrowed() const { return GrGpuResource::kBorrowed_LifeCycle == fResource->fLifeCycle; }
+
+ /**
+ * Is the resource object wrapping an externally allocated GPU resource that Skia has taken
+ * ownership of.
+ */
+ bool isAdopted() const { return GrGpuResource::kAdopted_LifeCycle == fResource->fLifeCycle; }
/**
* Called by the cache to delete the resource under normal circumstances.
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698