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

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: fix comment 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
Index: src/gpu/GrResourceCache2.h
diff --git a/src/gpu/GrResourceCache2.h b/src/gpu/GrResourceCache2.h
index d48ca0bf6d46bc7290a84f0819ebd681567e2d01..0e178f19e18d7cfa0ce48f7246489ebdd3d41f84 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,
robertphillips 2014/10/15 20:06:13 has -> have ?
bsalomon 2014/10/16 01:51:14 Done.
+ /** Will not return any resources that match but has pending IO. */
+ kRequireNoPendingIO_ScratchFlag = 0x2,
+ };
+ GrGpuResource* findAndRefScratchResource(const GrResourceKey& scratchKey, uint32_t flags = 0);
private:
#ifdef SK_DEBUG

Powered by Google App Engine
This is Rietveld 408576698