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

Issue 754685 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Unnecessary background repaints with no background image

Reported by r...@opera.com, Aug 11 2017

Issue description

We do a comparison of computed style for background properties in FillLayer and trigger a repaint if they differ. We don't need to do that if there are no background images present.

 
bgpaint.html
212 bytes View Download
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 16 2017

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

commit 1a519367e5550cd606e4ec78bda5d0f971d94cae
Author: Rune Lillesveen <rune@opera.com>
Date: Wed Aug 16 09:48:56 2017

Only need to repaint background for color changes with no image.

Implement a VisuallyEqual for backgrounds because computed style
comparison would trigger unnecessary repaints when background image
related properties changed when there were no images.

Bug:  754685 
Change-Id: I4c687426905e9687b298549b3015ac1207dbbc17
Reviewed-on: https://chromium-review.googlesource.com/612089
Reviewed-by: meade_UTC10 <meade@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#494738}
[add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/external/wpt/css-backgrounds/background-clip-color-ref.html
[add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/external/wpt/css-backgrounds/background-clip-color-repaint-ref.html
[add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/external/wpt/css-backgrounds/background-clip-color-repaint.html
[add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/external/wpt/css-backgrounds/background-clip-color.html
[add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/paint/invalidation/background-position-no-image-expected.txt
[add] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/LayoutTests/paint/invalidation/background-position-no-image.html
[modify] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/Source/core/style/FillLayer.cpp
[modify] https://crrev.com/1a519367e5550cd606e4ec78bda5d0f971d94cae/third_party/WebKit/Source/core/style/FillLayer.h

Comment 3 by r...@opera.com, Aug 16 2017

Status: Fixed (was: Started)

Sign in to add a comment