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

Unified Diff: src/gpu/GrTexture.cpp

Issue 1793383002: Only recycle "kSampler2D" textures as scratch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase for demo; do not submit Created 4 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTexture.cpp
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index 28746b93056fa4361230f5e973814f24d60b4c36..2211e68a4da4572b9da543caa11c1ed82e103106 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -92,7 +92,8 @@ GrTexture::GrTexture(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc,
: INHERITED(gpu, lifeCycle, desc)
, fSamplerType(samplerType) {
if (!this->isExternal() && !GrPixelConfigIsCompressed(desc.fConfig) &&
- !desc.fTextureStorageAllocator.fAllocateTextureStorage) {
+ !desc.fTextureStorageAllocator.fAllocateTextureStorage &&
+ kSampler2D_GrSLType == samplerType) {
GrScratchKey key;
GrTexturePriv::ComputeScratchKey(desc, &key);
this->setScratchKey(key);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698