Bug 113764 - Render images with low-quality scaling while FrameView is being resized.
Summary: Render images with low-quality scaling while FrameView is being resized.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: InRadar, Performance
Depends on:
Blocks:
 
Reported: 2013-04-02 03:10 PDT by Andreas Kling
Modified: 2013-04-04 09:27 PDT (History)
12 users (show)

See Also:


Attachments
Patch idea (5.56 KB, patch)
2013-04-02 03:44 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch (4.63 KB, patch)
2013-04-04 05:16 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2013-04-02 03:10:19 PDT
Live resizing a window typically causes a ton of image repaints. For images not at 1:1 scale, we should rescale at low quality until resizing ends. This'll avoid unnecessary work, especially on high-DPI devices where upscaled images are common.
Comment 1 Radar WebKit Bug Importer 2013-04-02 03:10:58 PDT
<rdar://problem/13555154>
Comment 2 Andreas Kling 2013-04-02 03:44:05 PDT
Created attachment 196115 [details]
Patch idea

Initial stab. Seems to work pretty well on my rMBP, thoughts welcome.
Comment 3 Andreas Kling 2013-04-02 06:08:12 PDT
Comment on attachment 196115 [details]
Patch idea

I ran into an issue where GIF animations can cause the ImageQualityController to punt the HQ repaint indefinitely. Retracting patch for now.
Comment 4 Andreas Kling 2013-04-04 05:16:26 PDT
Created attachment 196468 [details]
Proposed patch

Use a separate flag in ImageQualityController to determine whether we're in the "live window resize optimization" mode.
Comment 5 WebKit Review Bot 2013-04-04 05:26:16 PDT
Attachment 196468 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/rendering/RenderBoxModelObject.cpp']" exit_code: 1
Source/WebCore/rendering/RenderBoxModelObject.cpp:187:  An else if statement should be written as an if statement when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Antti Koivisto 2013-04-04 07:26:44 PDT
Comment on attachment 196468 [details]
Proposed patch

r=me
Comment 7 Antti Koivisto 2013-04-04 07:27:27 PDT
Comment on attachment 196468 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=196468&action=review

> Source/WebCore/rendering/RenderBoxModelObject.cpp:192
> +            return true;
> +        } else if (m_liveResizeOptimizationIsActive) {

No need for else after return.
Comment 8 Andreas Kling 2013-04-04 09:27:19 PDT
Committed r147638: <http://trac.webkit.org/changeset/147638>