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

Issue 408273003: Reset m_didTransformToRootUpdate flag during invalidationTreeIfNeeded (Closed)

Created:
6 years, 5 months ago by Xianzhu
Modified:
6 years, 5 months ago
CC:
blink-reviews, blink-reviews-rendering, krit, eae+blinkwatch, ed+blinkwatch_opera.com, f(malita), fs, gyuyoung.kim_webkit.org, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr., rwlbuis, rune+blink, Stephen Chennney, zoltan1
Project:
blink
Visibility:
Public.

Description

Reset m_didTransformToRootUpdate flag during invalidationTreeIfNeeded Previously m_didTransformToRootUpdate flag of RenderSVGViewportContainer and RenderSVGTransformableContainer only gets updated during layout. As we use the flag during invalidationTreeIfNeeded and we may call invalidationTreeIfNeeded when there is only repaint-only invalidation (https://codereview.chromium.org/398343003/), we should reset the flag after invalidation. Will be tested in https://codereview.chromium.org/398343003/. BUG=394619

Patch Set 1 #

Patch Set 2 : virtual clearPaintInvalidationState #

Total comments: 1

Patch Set 3 : super call #

Patch Set 4 : Based on https://codereview.chromium.org/389573008/ #

Total comments: 5

Patch Set 5 : Reset the flag only after invalidation #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -12 lines) Patch
M Source/core/rendering/RenderObject.h View 1 2 3 3 chunks +9 lines, -7 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGContainer.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGTransformableContainer.h View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGTransformableContainer.cpp View 1 2 3 4 2 chunks +11 lines, -1 line 4 comments Download
M Source/core/rendering/svg/RenderSVGViewportContainer.h View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGViewportContainer.cpp View 1 2 3 4 2 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 16 (0 generated)
Xianzhu
6 years, 5 months ago (2014-07-22 17:45:33 UTC) #1
dsinclair
This seems like it should be done in a clearPaintInvalidationState() override, instead of in invalidateTreeIfNeeded().
6 years, 5 months ago (2014-07-22 17:49:39 UTC) #2
Xianzhu
On 2014/07/22 17:49:39, dsinclair wrote: > This seems like it should be done in a ...
6 years, 5 months ago (2014-07-22 17:53:03 UTC) #3
Xianzhu
On 2014/07/22 17:53:03, Xianzhu wrote: > On 2014/07/22 17:49:39, dsinclair wrote: > > This seems ...
6 years, 5 months ago (2014-07-22 17:58:44 UTC) #4
dsinclair
Should we hold off on this until Julien gets his ASSERT landed? Will we need ...
6 years, 5 months ago (2014-07-22 18:03:52 UTC) #5
Xianzhu
On 2014/07/22 18:03:52, dsinclair wrote: > Should we hold off on this until Julien gets ...
6 years, 5 months ago (2014-07-22 18:22:30 UTC) #6
Xianzhu
On 2014/07/22 18:22:30, Xianzhu wrote: > On 2014/07/22 18:03:52, dsinclair wrote: > > Should we ...
6 years, 5 months ago (2014-07-22 23:12:39 UTC) #7
Julien - ping for review
https://codereview.chromium.org/408273003/diff/50001/Source/core/rendering/svg/RenderSVGTransformableContainer.h File Source/core/rendering/svg/RenderSVGTransformableContainer.h (right): https://codereview.chromium.org/408273003/diff/50001/Source/core/rendering/svg/RenderSVGTransformableContainer.h#newcode38 Source/core/rendering/svg/RenderSVGTransformableContainer.h:38: virtual bool didTransformToRootUpdate() const OVERRIDE { return m_didTransformToRootUpdate; } ...
6 years, 5 months ago (2014-07-23 18:47:39 UTC) #8
Xianzhu
https://codereview.chromium.org/408273003/diff/50001/Source/core/rendering/svg/RenderSVGTransformableContainer.h File Source/core/rendering/svg/RenderSVGTransformableContainer.h (right): https://codereview.chromium.org/408273003/diff/50001/Source/core/rendering/svg/RenderSVGTransformableContainer.h#newcode38 Source/core/rendering/svg/RenderSVGTransformableContainer.h:38: virtual bool didTransformToRootUpdate() const OVERRIDE { return m_didTransformToRootUpdate; } ...
6 years, 5 months ago (2014-07-23 18:52:30 UTC) #9
Xianzhu
https://codereview.chromium.org/408273003/diff/50001/Source/core/rendering/svg/RenderSVGTransformableContainer.h File Source/core/rendering/svg/RenderSVGTransformableContainer.h (right): https://codereview.chromium.org/408273003/diff/50001/Source/core/rendering/svg/RenderSVGTransformableContainer.h#newcode38 Source/core/rendering/svg/RenderSVGTransformableContainer.h:38: virtual bool didTransformToRootUpdate() const OVERRIDE { return m_didTransformToRootUpdate; } ...
6 years, 5 months ago (2014-07-23 19:05:08 UTC) #10
dsinclair
https://codereview.chromium.org/408273003/diff/70001/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp File Source/core/rendering/svg/RenderSVGTransformableContainer.cpp (right): https://codereview.chromium.org/408273003/diff/70001/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp#newcode100 Source/core/rendering/svg/RenderSVGTransformableContainer.cpp:100: m_didTransformToRootUpdate = true; I don't think we want to ...
6 years, 5 months ago (2014-07-23 19:20:59 UTC) #11
Xianzhu
https://codereview.chromium.org/408273003/diff/70001/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp File Source/core/rendering/svg/RenderSVGTransformableContainer.cpp (right): https://codereview.chromium.org/408273003/diff/70001/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp#newcode100 Source/core/rendering/svg/RenderSVGTransformableContainer.cpp:100: m_didTransformToRootUpdate = true; On 2014/07/23 19:20:59, dsinclair wrote: > ...
6 years, 5 months ago (2014-07-23 19:39:05 UTC) #12
Xianzhu
Found an issue of the latest change. The flag might be cleared too early before ...
6 years, 5 months ago (2014-07-23 19:42:33 UTC) #13
Julien - ping for review
We talked this with Dan and thought we should try to remove the pruning optimization. ...
6 years, 5 months ago (2014-07-23 20:05:24 UTC) #14
Xianzhu
On 2014/07/23 20:05:24, Julien Chaffraix - PST wrote: > We talked this with Dan and ...
6 years, 5 months ago (2014-07-24 00:49:19 UTC) #15
fs
6 years, 5 months ago (2014-07-24 08:43:56 UTC) #16
If the prune can be removed due to reduced frequency of the invalidation tree
walk (I don't see how the cost would be lower though), then that SGTM.

https://codereview.chromium.org/408273003/diff/70001/Source/core/rendering/sv...
File Source/core/rendering/svg/RenderSVGTransformableContainer.cpp (right):

https://codereview.chromium.org/408273003/diff/70001/Source/core/rendering/sv...
Source/core/rendering/svg/RenderSVGTransformableContainer.cpp:100:
m_didTransformToRootUpdate = true;
On 2014/07/23 20:05:24, Julien Chaffraix - PST wrote:
> On 2014/07/23 19:39:04, Xianzhu wrote:
> > On 2014/07/23 19:20:59, dsinclair wrote:
> > > I don't think we want to do this. We use this flag to determine if we can
> skip
> > > the tree walk. So, I think what we care about is the result of the last
> > layout.
> > >
> > > If the last layout sets this to true, then we can skip the tree walk as
the
> > > container will handle the invalidations.
> > >
> > 
> > > If the last layout sets this to false, then we have to do the tree walk as
> we
> > > don't know if the container will do the invalidations for us.
> > > 
> > > This change will, potentially, set this to true on the first layout but
then
> > on
> > > the last layout, if it should be false we'll leave the flag as true. So
the
> > > container won't issue the invalidation for us, and we'll terminate the
tree
> > walk
> > > early. Leaving the subtree as potentially missed invalidations.
> > 
> > I think the full invalidation on transform change should happen in the next
> > invalidateTreeIfNeeded(). If this is true, it is correct to skip subtree
> walking
> > if the flag is set in any layout since the last invalidateTreeIfNeeded().
> > 
> > I didn't find any direct paint invalidation code in svg. However I'm not
> > familiar with SVG code.
> 
> I agree with Xianzhu on this one, it's conceptually wrong to ignore all
layouts
> but the last one when generating invalidations. This is because now the order
of
> layouts will have an impact on our invalidations.

If there's N layouts to one repaint, and the container is moved (transform
changed) in one of them, then repainting only the container should be sufficient
because the repaint area of the container is the union of all it's children.
From that PoV accumulating into it seems fine (I think I'd just have |= though
for a smaller change =)). This flag is still used to do funky stuff to text
metrics during layout though (see SVGRenderSupport).

Powered by Google App Engine
This is Rietveld 408576698