Index: src/gpu/GrContext.cpp |
=================================================================== |
--- src/gpu/GrContext.cpp (revision 8005) |
+++ src/gpu/GrContext.cpp (working copy) |
@@ -428,7 +428,7 @@ |
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 @@ |
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; |
} |