aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Eric Karl <ericrk@chromium.org>2016-11-30 11:09:29 -0800
committerGravatar Brian Salomon <bsalomon@google.com>2016-11-30 19:30:42 +0000
commita422d706b1a92e71c6f940de3ed3d0b84a13eb1b (patch)
tree70518ba6a0147b56488f43860bf56c909556555d /src
parent78f5af7ff3e5010a985f0546e25e52df5b0681b9 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/image/SkImage_Gpu.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 0a89cf5c6f..07d352a961 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -400,24 +400,10 @@ struct DeferredTextureImage {
} // 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 {