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

Unified Diff: src/gpu/GrContext.cpp

Issue 879963003: Fix GPU resource cache related assertions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « include/gpu/GrResourceKey.h ('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/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 6879b109cd76c0c6b64b130346a5204d3c72888c..13b0bfaec5cb537a83524ecc87bc0341a883dbe1 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -502,9 +502,11 @@ GrTexture* GrContext::refScratchTexture(const GrSurfaceDesc& inDesc, ScratchTexM
GrTexture* texture = fGpu->createTexture(*desc, true, NULL, 0);
#ifdef SK_DEBUG
- GrScratchKey key;
- GrTexturePriv::ComputeScratchKey(*desc, &key);
- SkASSERT(NULL == texture || texture->cacheAccess().getScratchKey() == key);
+ if (fGpu->caps()->reuseScratchTextures() || (desc->fFlags & kRenderTarget_GrSurfaceFlag)) {
+ GrScratchKey key;
+ GrTexturePriv::ComputeScratchKey(*desc, &key);
+ SkASSERT(NULL == texture || texture->cacheAccess().getScratchKey() == key);
+ }
#endif
return texture;
}
« no previous file with comments | « include/gpu/GrResourceKey.h ('k') | src/gpu/GrResourceCache2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698