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>
Cherry-pick to M55
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5385
Change-Id: I46f81d918613b885d29332b7f0070dc518219935
Reviewed-on: https://skia-review.googlesource.com/5385
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index b769e0a..dd8a5e7 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -384,24 +384,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 {