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

Unified Diff: src/gpu/GrResourceCache2.h

Issue 650283002: Prefer to recycle non-RT scratch textures that don't have pending IO (Closed) Base URL: https://skia.googlesource.com/skia.git@ast
Patch Set: Address comments Created 6 years, 2 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/GrContext.cpp ('k') | src/gpu/GrResourceCache2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceCache2.h
diff --git a/src/gpu/GrResourceCache2.h b/src/gpu/GrResourceCache2.h
index d48ca0bf6d46bc7290a84f0819ebd681567e2d01..e10b45a2cc137768aae861231d67cd72f4af3c6f 100644
--- a/src/gpu/GrResourceCache2.h
+++ b/src/gpu/GrResourceCache2.h
@@ -32,8 +32,13 @@ public:
void releaseAll();
- GrGpuResource* findAndRefScratchResource(const GrResourceKey& scratchKey,
- bool calledDuringFlush);
+ enum {
+ /** Preferentially returns scratch resources with no pending IO. */
+ kPreferNoPendingIO_ScratchFlag = 0x1,
+ /** Will not return any resources that match but have pending IO. */
+ kRequireNoPendingIO_ScratchFlag = 0x2,
+ };
+ GrGpuResource* findAndRefScratchResource(const GrResourceKey& scratchKey, uint32_t flags = 0);
private:
#ifdef SK_DEBUG
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrResourceCache2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698