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

Issue 213103003: Optimize 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, jchaffraix+rendering, pdr., rune+blink, Julien - ping for review, eseidel, leviw_travelin_and_unemployed
Visibility:
Public.

Description

Optimize repaint on FrameView resize Previously we always repaint the full FrameView on resize. Don't mark full repaint if the resize is height-only and writing mode is horizontal. Any descendants needing repaint because of FrameView resize will still schedule their own repaints. BUG=258219 TEST=WebFrameTest.sizeChangeRepaint Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170427

Patch Set 1 #

Total comments: 2

Patch Set 2 : Actual parameters #

Total comments: 6

Patch Set 3 : More comments #

Total comments: 1

Patch Set 4 : Fix nullptr #

Total comments: 4

Patch Set 5 : Update FIXME #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -8 lines) Patch
M Source/core/frame/FrameView.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 chunks +15 lines, -5 lines 0 comments Download
M Source/core/rendering/RenderObject.h View 1 2 3 4 4 chunks +11 lines, -3 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 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: 39 (0 generated)
Xianzhu
As https://codereview.chromium.org/197283038/ and https://codereview.chromium.org/204813002/ touch the rendering core and may need more time to pass ...
6 years, 9 months ago (2014-03-26 17:30:00 UTC) #1
Xianzhu
The new optional parameter 'fullRepaintLayer' of RenderObject::setNeedsLayout() may look not good, but eventually we'll remove ...
6 years, 9 months ago (2014-03-26 17:36:25 UTC) #2
esprehn
lgtm, Ojan might want to take a look too since he has opinions about how ...
6 years, 9 months ago (2014-03-26 17:46:16 UTC) #3
Xianzhu
https://codereview.chromium.org/213103003/diff/1/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/213103003/diff/1/Source/core/frame/FrameView.cpp#newcode1751 Source/core/frame/FrameView.cpp:1751: renderView->setNeedsLayout(MarkOnlyThis, 0, false); On 2014/03/26 17:46:17, esprehn wrote: > ...
6 years, 9 months ago (2014-03-26 18:08:39 UTC) #4
Xianzhu
ojan@, would you please take a look?
6 years, 9 months ago (2014-03-27 16:31:23 UTC) #5
ojan
https://codereview.chromium.org/213103003/diff/20001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/213103003/diff/20001/Source/core/frame/FrameView.cpp#newcode944 Source/core/frame/FrameView.cpp:944: if (!renderView()->style()->isHorizontalWritingMode() || oldSize.width() != m_size.width()) I'm not sure ...
6 years, 9 months ago (2014-03-28 01:51:36 UTC) #6
ojan
To be clear, I'm not saying the patch is wrong...I just don't understand repaint well ...
6 years, 9 months ago (2014-03-28 02:18:16 UTC) #7
Xianzhu
https://codereview.chromium.org/213103003/diff/20001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/213103003/diff/20001/Source/core/frame/FrameView.cpp#newcode944 Source/core/frame/FrameView.cpp:944: if (!renderView()->style()->isHorizontalWritingMode() || oldSize.width() != m_size.width()) On 2014/03/28 01:51:36, ...
6 years, 9 months ago (2014-03-28 16:26:00 UTC) #8
eseidel
https://codereview.chromium.org/213103003/diff/40001/Source/core/rendering/RenderObject.h File Source/core/rendering/RenderObject.h (right): https://codereview.chromium.org/213103003/diff/40001/Source/core/rendering/RenderObject.h#newcode1286 Source/core/rendering/RenderObject.h:1286: if (repaintLayer == RepaintLayer && hasLayer()) This repaint call ...
6 years, 9 months ago (2014-03-28 16:36:40 UTC) #9
eseidel
I'm OK with this change. This fix would not be necessary if we fixed crbug.com/325569 ...
6 years, 9 months ago (2014-03-28 16:41:54 UTC) #10
Xianzhu
On 2014/03/28 16:41:54, eseidel wrote: > I'm OK with this change. This fix would not ...
6 years, 9 months ago (2014-03-28 16:53:07 UTC) #11
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 9 months ago (2014-03-28 16:53:14 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/213103003/40001
6 years, 9 months ago (2014-03-28 16:53:19 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-28 17:00:24 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 9 months ago (2014-03-28 17:00:25 UTC) #15
ojan
Can you explain what's different between width and height? eseidel maybe you understand?
6 years, 9 months ago (2014-03-28 17:16:19 UTC) #16
Xianzhu
On 2014/03/28 17:16:19, ojan wrote: > Can you explain what's different between width and height? ...
6 years, 9 months ago (2014-03-28 17:21:25 UTC) #17
Xianzhu
I tried not to mark full repaint for width change and vertical writing mode. It ...
6 years, 9 months ago (2014-03-28 17:31:16 UTC) #18
eseidel
Layout is width in, height out. Except when dealing with vertical writing mode, in which ...
6 years, 9 months ago (2014-03-28 18:33:24 UTC) #19
ojan
On 2014/03/28 17:21:25, Xianzhu wrote: > Another reason that I care more about height change ...
6 years, 9 months ago (2014-03-28 18:51:38 UTC) #20
ojan
The CQ bit was checked by ojan@chromium.org
6 years, 9 months ago (2014-03-28 18:51:42 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/213103003/40001
6 years, 9 months ago (2014-03-28 18:51:49 UTC) #22
eseidel
I think we should wiat until Ojan is back from lunch and we can discuss ...
6 years, 9 months ago (2014-03-28 18:56:26 UTC) #23
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 9 months ago (2014-03-28 18:56:42 UTC) #24
Xianzhu
The CQ bit was unchecked by wangxianzhu@chromium.org
6 years, 9 months ago (2014-03-28 18:57:23 UTC) #25
Xianzhu
I uploaded a new Patch Set (to fix nullptr break) after ojan@ checked the CQ ...
6 years, 9 months ago (2014-03-28 19:05:44 UTC) #26
ojan
The CQ bit was checked by ojan@chromium.org
6 years, 9 months ago (2014-03-29 00:39:35 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/213103003/60001
6 years, 9 months ago (2014-03-29 00:39:39 UTC) #28
Julien - ping for review
lgtm I think this works but it's _very_ fragile as it relies on the implicit ...
6 years, 9 months ago (2014-03-29 01:01:26 UTC) #29
Julien - ping for review
The CQ bit was unchecked by jchaffraix@chromium.org
6 years, 9 months ago (2014-03-29 01:01:38 UTC) #30
ojan
https://codereview.chromium.org/213103003/diff/60001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/213103003/diff/60001/Source/core/frame/FrameView.cpp#newcode950 Source/core/frame/FrameView.cpp:950: if (!renderView()->style()->isHorizontalWritingMode() || oldSize.width() != m_size.width()) On 2014/03/29 01:01:26, ...
6 years, 9 months ago (2014-03-29 01:15:45 UTC) #31
Xianzhu
https://codereview.chromium.org/213103003/diff/60001/Source/core/rendering/RenderObject.h File Source/core/rendering/RenderObject.h (right): https://codereview.chromium.org/213103003/diff/60001/Source/core/rendering/RenderObject.h#newcode1285 Source/core/rendering/RenderObject.h:1285: // FIXME: This may be incorrect, but needed at ...
6 years, 8 months ago (2014-03-30 22:26:52 UTC) #32
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-03-30 22:27:02 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/213103003/80001
6 years, 8 months ago (2014-03-30 22:27:07 UTC) #34
eseidel
This CL does two things: 1. It further tweaks an optimization in layout() to trade ...
6 years, 8 months ago (2014-03-30 22:42:07 UTC) #35
esprehn
I'll look at this on Monday, I'm a little concerned about flooding ourself with invalidations. ...
6 years, 8 months ago (2014-03-30 23:21:02 UTC) #36
commit-bot: I haz the power
Change committed as 170427
6 years, 8 months ago (2014-03-31 07:02:26 UTC) #37
Xianzhu
On 2014/03/30 23:21:02, esprehn wrote: > I'll look at this on Monday, I'm a little ...
6 years, 8 months ago (2014-03-31 16:16:25 UTC) #38
Xianzhu
6 years, 8 months ago (2014-04-11 18:23:18 UTC) #39
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/235323005/ by wangxianzhu@chromium.org.

The reason for reverting is: Under-repaint if body has percentage positioned or
bottom aligned background-image when changing height.

Will work on bug 358460 first.

BUG=362407.

Powered by Google App Engine
This is Rietveld 408576698