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; |