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

Unified Diff: include/gpu/SkGrPixelRef.h

Issue 611383003: Revert of GrResourceCache2 manages scratch texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@surfimpl
Patch Set: Created 6 years, 3 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 | « include/gpu/SkGr.h ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/SkGrPixelRef.h
diff --git a/include/gpu/SkGrPixelRef.h b/include/gpu/SkGrPixelRef.h
index 9a81be67de50c1107353bb2e8d8b4c8d0945d95f..7e6a9d02ed364e6d2780054e4fb3f07f05553226 100644
--- a/include/gpu/SkGrPixelRef.h
+++ b/include/gpu/SkGrPixelRef.h
@@ -41,9 +41,11 @@
public:
SK_DECLARE_INST_COUNT(SkGrPixelRef)
/**
- * Constructs a pixel ref around a GrSurface.
+ * Constructs a pixel ref around a GrSurface. If the caller has locked the GrSurface in the
+ * cache and would like the pixel ref to unlock it in its destructor then transferCacheLock
+ * should be set to true.
*/
- SkGrPixelRef(const SkImageInfo&, GrSurface*);
+ SkGrPixelRef(const SkImageInfo&, GrSurface*, bool transferCacheLock = false);
virtual ~SkGrPixelRef();
// override from SkPixelRef
@@ -56,6 +58,8 @@
private:
GrSurface* fSurface;
+ bool fUnlock; // if true the pixel ref owns a texture cache lock on fSurface
+
typedef SkROLockPixelsPixelRef INHERITED;
};
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698