New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 734215 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocked on:
issue 735174



Sign in to add a comment

Remove ImageQualityController

Project Member Reported by pdr@chromium.org, Jun 16 2017

Issue description

ImageQualityController uses heuristics to draw resizing images at a lower quality during resizes, then snaps them to high quality once resizing stops. This was needed for performance in the past but is less useful today because ganesh has "free" resizes and software uses medium quality anyway. Authors have complained about this behavior ( https://crbug.com/596382 ,  https://crbug.com/503040 ,  https://crbug.com/514714 ) and we'd like to let authors make these decisions if possible.

I'm going to try to remove ImageQualityController. An important test to make sure we don't regress: check browser upscale resizing on a mac with ganesh disabled.
 
Labels: BugSource-Team PaintTeamTriaged-20170616

Comment 2 by pdr@chromium.org, Jun 27 2017

A precondition for this change is to switch all resampling algorithms to medium quality (aka bilinear). Otherwise, removing ImageQualityController would lead to very expensive repaints while resizing the browser window. We did some experiments (http://jsbin.com/radoni/quiet) and medium-quality images are nearly identical to high-quality for upscale.

Comment 3 by pdr@chromium.org, Jun 27 2017

Blockedon: 735174
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68

commit 2b21ab04f7543ad0a20e02a92c60400b4e8e7f68
Author: pdr <pdr@chromium.org>
Date: Thu Jul 13 01:18:19 2017

Remove ImageQualityController

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
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486197}
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/layout/BUILD.gn
[delete] https://crrev.com/b38c2a973dde008cd590c43141ce71351a2a3a5f/third_party/WebKit/Source/core/layout/ImageQualityController.cpp
[delete] https://crrev.com/b38c2a973dde008cd590c43141ce71351a2a3a5f/third_party/WebKit/Source/core/layout/ImageQualityController.h
[delete] https://crrev.com/b38c2a973dde008cd590c43141ce71351a2a3a5f/third_party/WebKit/Source/core/layout/ImageQualityControllerTest.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/layout/LayoutEmbeddedContentTest.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/loader/resource/ImageResourceObserver.h
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/paint/BoxPainter.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/paint/ImagePainter.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/2b21ab04f7543ad0a20e02a92c60400b4e8e7f68/third_party/WebKit/Source/core/style/ComputedStyle.h

Comment 5 by pdr@chromium.org, Jul 18 2017

Status: Fixed (was: Assigned)
This stuck!

Comment 6 by vmp...@chromium.org, Jul 18 2017

\o/

Sign in to add a comment