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

Unified Diff: include/gpu/GrContext.h

Issue 19636002: Plumb in flag for reusing scratch textures (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove external override of scratch texture reuse behavior Created 7 years, 5 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 | « no previous file | src/gpu/GrContext.cpp » ('j') | src/gpu/GrDrawTarget.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
===================================================================
--- include/gpu/GrContext.h (revision 10144)
+++ include/gpu/GrContext.h (working copy)
@@ -84,6 +84,15 @@
}
/**
+ * Change the context's scratch texture reuse behavior. On some platforms
bsalomon 2013/07/18 18:12:08 Do we need this function at all? Do we need anythi
+ * reusing scratch textures can cause the driver to ghost the texture
+ * which, in excess, can lead to out of memory problems
+ */
+ void setReuseScratchTextures(bool reuseScratchTextures) {
+ fReuseScratchTextures = reuseScratchTextures;
+ }
+
+ /**
* Abandons all GPU resources, assumes 3D API state is unknown. Call this
* if you have lost the associated GPU context, and thus internal texture,
* buffer, etc. references/IDs are now invalid. Should be called even when
@@ -866,6 +875,8 @@
int fPMToUPMConversion;
int fUPMToPMConversion;
+ bool fReuseScratchTextures;
bsalomon 2013/07/18 18:12:08 Do we need this or can it just look at the GrGpu's
+
struct CleanUpData {
PFCleanUpFunc fFunc;
void* fInfo;
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | src/gpu/GrDrawTarget.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698