aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrContext.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index a3b26a615c..2b3d2a9070 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -428,7 +428,7 @@ GrTexture* GrContext::lockAndRefScratchTexture(const GrTextureDesc& inDesc, Scra
if (kApprox_ScratchTexMatch == match) {
// bin by pow2 with a reasonable min
- static const int MIN_SIZE = 256;
+ static const int MIN_SIZE = 16;
desc.fWidth = GrMax(MIN_SIZE, GrNextPow2(desc.fWidth));
desc.fHeight = GrMax(MIN_SIZE, GrNextPow2(desc.fHeight));
}
@@ -455,23 +455,13 @@ GrTexture* GrContext::lockAndRefScratchTexture(const GrTextureDesc& inDesc, Scra
if (kExact_ScratchTexMatch == match) {
break;
}
- // We had a cache miss and we are in approx mode, relax the fit of the flags... then try
- // doubling width... then the height.
+ // We had a cache miss and we are in approx mode, relax the fit of the flags.
// We no longer try to reuse textures that were previously used as render targets in
// situations where no RT is needed; doing otherwise can confuse the video driver and
// cause significant performance problems in some cases.
if (desc.fFlags & kNoStencil_GrTextureFlagBit) {
desc.fFlags = desc.fFlags & ~kNoStencil_GrTextureFlagBit;
- } else if (!doubledW) {
- desc.fFlags = inDesc.fFlags;
- desc.fWidth *= 2;
- doubledW = true;
- } else if (!doubledH) {
- desc.fFlags = inDesc.fFlags;
- desc.fWidth = origWidth;
- desc.fHeight *= 2;
- doubledH = true;
} else {
break;
}