Remove ImageQualityController

Desktop / Chromium - pdr [chromium.org] - 12 July 2017 21:18 EDT

ImageQualityController used heuristics to draw resizing images at a lower quality during resizes, then snap them to high quality once resizing stops. This was needed for performance of high-quality image scales in the past, but is less useful today because images are never scaled with a high quality filter.

This patch completely removes the ImageQualityController which has the following benefits: 1) One less virtual on ImageResourceObserver. 2) No more visual snap as image quality changes (https://crbug.com/503040). 3) A call removed from LayoutBoxModelObject::WillBeDestroyed. 4) Much complexity removed.

[1] https://chromium-review.googlesource.com/c/541609/

Bug: 503040, 734215 Change-Id: I6552767925887b3154a99339976a4b624e64bac5 Reviewed-on: https://chromium-review.googlesource.com/567564

2b21ab0 Remove ImageQualityController
third_party/WebKit/Source/core/BUILD.gn | 1 -
third_party/WebKit/Source/core/layout/BUILD.gn | 2 -
.../Source/core/layout/ImageQualityController.cpp | 243 -------------
.../Source/core/layout/ImageQualityController.h | 131 -------
.../core/layout/ImageQualityControllerTest.cpp | 397 ---------------------
.../Source/core/layout/LayoutBoxModelObject.cpp | 3 -
.../core/layout/LayoutBoxModelObjectTest.cpp | 1 -
.../WebKit/Source/core/layout/LayoutBoxTest.cpp | 1 -
.../core/layout/LayoutEmbeddedContentTest.cpp | 12 -
.../WebKit/Source/core/layout/LayoutObject.h | 4 -
.../Source/core/layout/svg/LayoutSVGImage.cpp | 2 -
.../core/loader/resource/ImageResourceObserver.h | 4 -
.../WebKit/Source/core/paint/BoxPainter.cpp | 18 +-
.../WebKit/Source/core/paint/ImagePainter.cpp | 16 +-
.../Source/core/paint/NinePieceImagePainter.cpp | 8 +-
.../WebKit/Source/core/paint/SVGImagePainter.cpp | 14 +-
.../WebKit/Source/core/style/ComputedStyle.cpp | 10 +
.../WebKit/Source/core/style/ComputedStyle.h | 2 +
18 files changed, 19 insertions(+), 850 deletions(-)

Upstream: git.chromium.org


  • Share