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

Issue 204813002: Optimize layout/repaint on FrameView resize (Closed)

Created:
6 years, 9 months ago by Xianzhu
Modified:
6 years, 8 months ago
CC:
blink-reviews, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, Julien - ping for review, pdr.
Visibility:
Public.

Description

Optimize layout/repaint on FrameView resize Use the new setNeedsResizeLayout() (https://codereview.chromium.org/197283038/) to schedule layout on FrameView resize. BUG=258219 TEST=WebFrameTest.sizeChangeRepaint

Patch Set 1 : #

Patch Set 2 : Is it better to let layout fully control what to repaint? #

Total comments: 11

Patch Set 3 : Keep FrameView::m_doFullRepaint #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -2 lines) Patch
M Source/core/frame/FrameView.h View 2 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 chunks +16 lines, -2 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 1 chunk +73 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint1.html View 1 chunk +6 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint10.html View 1 chunk +9 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint2.html View 1 chunk +8 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint3.html View 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint4.html View 1 chunk +7 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint5.html View 1 chunk +13 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint6.html View 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint7.html View 1 chunk +6 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint8.html View 1 chunk +6 lines, -0 lines 0 comments Download
A Source/web/tests/data/repaint/size-change-repaint9.html View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Xianzhu
6 years, 9 months ago (2014-03-19 17:41:59 UTC) #1
Xianzhu
The difference between Patch Set 1 and Patch Set 2 is about FrameView::needsFullRepaint(). In Patch ...
6 years, 9 months ago (2014-03-19 17:45:52 UTC) #2
Xianzhu
+dsinclair@ about repaint.
6 years, 9 months ago (2014-03-19 17:46:41 UTC) #3
dsinclair
+leviw as he has been digging into LayoutState and can better comment on that bit ...
6 years, 9 months ago (2014-03-20 10:41:41 UTC) #4
Xianzhu
On 2014/03/20 10:41:41, dsinclair wrote: > +leviw as he has been digging into LayoutState and ...
6 years, 9 months ago (2014-03-20 16:52:36 UTC) #5
Xianzhu
PTAL. Patch Set 3 reverted Patch Set 2 about FrameView::m_doFullRepaint. It does child invalidations instead ...
6 years, 9 months ago (2014-03-20 17:47:42 UTC) #6
dsinclair
https://codereview.chromium.org/204813002/diff/70001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (left): https://codereview.chromium.org/204813002/diff/70001/Source/core/frame/FrameView.cpp#oldcode1008 Source/core/frame/FrameView.cpp:1008: repaintTree(rootForThisLayout); On 2014/03/20 17:47:43, Xianzhu wrote: > On 2014/03/20 ...
6 years, 9 months ago (2014-03-21 09:39:27 UTC) #7
Xianzhu
https://codereview.chromium.org/204813002/diff/70001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (left): https://codereview.chromium.org/204813002/diff/70001/Source/core/frame/FrameView.cpp#oldcode1008 Source/core/frame/FrameView.cpp:1008: repaintTree(rootForThisLayout); On 2014/03/21 09:39:27, dsinclair wrote: > On 2014/03/20 ...
6 years, 9 months ago (2014-03-21 16:17:08 UTC) #8
eseidel
6 years, 8 months ago (2014-04-01 18:28:30 UTC) #9
So this "resize layout" would be a temporary fix until we taught
setNeedsLayout(true) to not always cause a repaint?  In general the time spent
actually laying out even a large complicated rendering tree is extremely small. 
It's been my experiance that it's more the consequences of layout which are
costly (like the Raster jobs triggered by the invalidations).

I'd like to understand if this is a temporary fix, or the permenent solution. 
If this is only temporary, do we agree on a longer term vision for making
self-layout's not unconditionally cause repaints?

Powered by Google App Engine
This is Rietveld 408576698