Disable mipmap pre-generation path
There is a bug in the mipmap pre-generation logic in use in
getDeferredTextureImageData. This can cause runaway memory leaks, so we
are disabling this path until we can investigate further.
BUG=669775
Change-Id: I2027f6f7994e089edd4f3452284e894752b31779
Reviewed-on: https://skia-review.googlesource.com/5357
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 0a89cf5..07d352a 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -400,24 +400,10 @@
} // anonymous namespace
static bool should_use_mip_maps(const SkImage::DeferredTextureImageUsageParams & param) {
- bool shouldUseMipMaps = false;
-
- // Use mipmaps if either
- // 1.) it is a perspective matrix, or
- // 2.) the quality is med/high and the scale is < 1
- if (param.fMatrix.hasPerspective()) {
- shouldUseMipMaps = true;
- }
- if (param.fQuality == kMedium_SkFilterQuality ||
- param.fQuality == kHigh_SkFilterQuality) {
- SkScalar minAxisScale = param.fMatrix.getMinScale();
- if (minAxisScale != -1.f && minAxisScale < 1.f) {
- shouldUseMipMaps = true;
- }
- }
-
-
- return shouldUseMipMaps;
+ // There is a bug in the mipmap pre-generation logic in use in getDeferredTextureImageData.
+ // This can cause runaway memory leaks, so we are disabling this path until we can
+ // investigate further. crbug.com/669775
+ return false;
}
namespace {