From bf2d9e02d58ea01f1c239f7e2fc024cba140ccb1 Mon Sep 17 00:00:00 2001 From: Eric Karl Date: Mon, 23 Jan 2017 13:27:57 -0800 Subject: [PATCH] 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 Reviewed-on: https://skia-review.googlesource.com/7285 --- src/image/SkImage_Gpu.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index c75e36b..c08a38c 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -390,24 +390,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 { -- 2.7.4