diff options
author | 2015-06-23 08:23:08 -0700 | |
---|---|---|
committer | 2015-06-23 08:23:08 -0700 | |
commit | e935f1a0e2351373c33600b8388492ce1218014a (patch) | |
tree | 9182150ea7c4cedda75dc2b9d2f6027937c7aed8 /include/gpu | |
parent | 591a2ca842cb34919695a32757d700dee8b7822c (diff) |
Refactor GrBufferAllocPools to use resource cache
Review URL: https://codereview.chromium.org/1139753002
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrCaps.h | 3 | ||||
-rw-r--r-- | include/gpu/GrTextureProvider.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 10e100f8aa..9ad20e53e4 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -185,6 +185,7 @@ public: // recycled in the texture cache. This is to prevent ghosting by drivers // (in particular for deferred architectures). bool reuseScratchTextures() const { return fReuseScratchTextures; } + bool reuseScratchBuffers() const { return fReuseScratchBuffers; } int maxRenderTargetSize() const { return fMaxRenderTargetSize; } int maxTextureSize() const { return fMaxTextureSize; } @@ -229,10 +230,12 @@ protected: bool fStencilWrapOpsSupport : 1; bool fDiscardRenderTargetSupport : 1; bool fReuseScratchTextures : 1; + bool fReuseScratchBuffers : 1; bool fGpuTracingSupport : 1; bool fCompressedTexSubImageSupport : 1; bool fOversizedStencilSupport : 1; bool fTextureBarrierSupport : 1; + // Driver workaround bool fUseDrawInsteadOfClear : 1; bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; diff --git a/include/gpu/GrTextureProvider.h b/include/gpu/GrTextureProvider.h index b91809c6ea..28fda48c43 100644 --- a/include/gpu/GrTextureProvider.h +++ b/include/gpu/GrTextureProvider.h @@ -158,12 +158,12 @@ protected: GrGpu* gpu() { return fGpu; } const GrGpu* gpu() const { return fGpu; } -private: bool isAbandoned() const { SkASSERT(SkToBool(fGpu) == SkToBool(fCache)); return !SkToBool(fCache); } +private: GrResourceCache* fCache; GrGpu* fGpu; }; |