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

Unified Diff: src/gpu/GrResourceCache2.h

Issue 608883003: GrResourceCache2 manages scratch texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@surfimpl
Patch Set: remove todo 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/GrResourceCache.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 e05efd744e44d9e75b157e8c67f9e53648f39fd1..d48ca0bf6d46bc7290a84f0819ebd681567e2d01 100644
--- a/src/gpu/GrResourceCache2.h
+++ b/src/gpu/GrResourceCache2.h
@@ -24,14 +24,17 @@ public:
GrResourceCache2() : fCount(0) {};
~GrResourceCache2();
- void insertResource(GrGpuResource* resource);
+ void insertResource(GrGpuResource*);
- void removeResource(GrGpuResource* resource);
+ void removeResource(GrGpuResource*);
void abandonAll();
void releaseAll();
+ GrGpuResource* findAndRefScratchResource(const GrResourceKey& scratchKey,
+ bool calledDuringFlush);
+
private:
#ifdef SK_DEBUG
bool isInCache(const GrGpuResource* r) const {
@@ -39,8 +42,8 @@ private:
}
#endif
+ class AvailableForScratchUse;
- void removeScratch(const GrGpuResource* resource);
struct ScratchMapTraits {
static const GrResourceKey& GetKey(const GrGpuResource& r) {
return r.getScratchKey();
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | src/gpu/GrResourceCache2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698