Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Issue 2307983002: Include scroll offset in scrolling contents painted background rect invalidation. (Closed)

Created:
4 years, 3 months ago by flackr
Modified:
4 years, 3 months ago
Reviewers:
chrishtr
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, slimming-paint-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Include scroll offset in scrolling contents painted background rect invalidation. BUG=643741 TEST=paint/invalidation/composited-overflow-with-local-background.html CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Patch Set 1 #

Messages

Total messages: 9 (3 generated)
flackr
PTAL, this fixes the invalidation bug that led to https://codereview.chromium.org/2264663002 being reverted. We need to ...
4 years, 3 months ago (2016-09-02 16:35:11 UTC) #3
chrishtr
Please attach a bug. Also, why does it need to be adjusted for scroll in ...
4 years, 3 months ago (2016-09-02 17:08:41 UTC) #4
flackr
On 2016/09/02 at 17:08:41, chrishtr wrote: > Please attach a bug. Done. > > Also, ...
4 years, 3 months ago (2016-09-02 18:18:12 UTC) #6
flackr
On 2016/09/02 at 18:18:12, flackr wrote: > On 2016/09/02 at 17:08:41, chrishtr wrote: > > ...
4 years, 3 months ago (2016-09-02 18:30:34 UTC) #7
chrishtr
On 2016/09/02 at 18:18:12, flackr wrote: > On 2016/09/02 at 17:08:41, chrishtr wrote: > > ...
4 years, 3 months ago (2016-09-02 18:45:32 UTC) #8
flackr
4 years, 3 months ago (2016-09-02 18:58:22 UTC) #9
On 2016/09/02 at 18:45:32, chrishtr wrote:
> On 2016/09/02 at 18:18:12, flackr wrote:
> > On 2016/09/02 at 17:08:41, chrishtr wrote:
> > > Please attach a bug.
> > 
> > Done.
> > 
> > > 
> > > Also, why does it need to be adjusted for scroll in this case? We do not
include scroll offset
> > > for composited scrolling.
> > 
> > We're adjusting for the same reason we include the scroll offset in
BoxPainter::paintBoxDecorationBackground(
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/paint/Box...
), because we're painting into the scrolling contents layer from context of the
composited scroll container.
> > 
> > I believe in the invalidation in scrolling contents case, the passed in rect
already includes this offset, but the rect in this case is for the overflow:
scroll element so it's not in the context of the scroll which is why we create a
new rect.
> 
> It's not already included. The reason is that m_scrollingContentsLayer is
positioned in the same coordinate space as m_graphicsLayer (this was a change I
made a couple of months ago). Thus composited scrolling should not be
> included in paint invalidation rects. As a result, I'm not sure why your test
is failing...
> 
> 
> In the case of BoxPainter, the scroll offset is added because the scrolling
content paints in a scrolled space. For the composited path, this scroll offset
is exactly counteracted by this code:
> 
>
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/co...
> 
> so that you in effect paint at the same offset for every scroll offset, if the
content is composited. (And if it's not composited, scroll offsets must be
applied to get the right coordinates.)

I'm not sure the exact cause, but the paint under-invalidation check thinks that
the scrolling contents background is being drawn at -scrollOffset, which doesn't
match the invalidation. Perhaps those paints need to be recorded differently
somehow?

Powered by Google App Engine
This is Rietveld 408576698