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

Issue 202533003: Don't schedule an animation during compositing dirty-bit setting unless needed. (Closed)

Created:
6 years, 9 months ago by chrishtr
Modified:
6 years, 9 months ago
CC:
blink-reviews, shans, rjwright, alancutter (OOO until 2018), Mike Lawther (Google), dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, dstockwell, Timothy Loh, jchaffraix+rendering, darktears, bemjb+rendering_chromium.org, pdr., Steve Block, dino_apple.com, Eric Willigers
Visibility:
Public.

Description

Don't schedule an animation during compositing dirty-bit setting unless needed. In particular, don't do it if the dirty bits are going to be cleaned up during synchronous Blink execution anyway. To achieve this, this CL adds an m_updatingLayoutAndStyleForPainting state bit in PageAnimator to indicate that code is in progress which is guaranteed to call RenderLayerCompositor::updateCompositingLayers() at its end, and therefore any compositing dirty bits set before that call do not require a call to scheduleAnimation(). Unfortunately, in a small number of cases RenderLayerCompositor::updateCompositingLayers will set *new* dirty bits when updating direct compositing reasons. So put in code to check each RenderLayerCompositor instance in the frame tree for dirty bits after RenderLayerCompositor::updateCompositingLayers has run and call scheduleAnimation() if so. In the future we can remove this once the compositing code is fixed to not leave around dirty bits. BUG=340679 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169672

Patch Set 1 #

Patch Set 2 : Cleanup. #

Patch Set 3 : Cleanup. #

Total comments: 4

Patch Set 4 : Addressed comments from abarth@. #

Total comments: 2

Patch Set 5 : Added bug link. #

Patch Set 6 : Add null check. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -19 lines) Patch
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 1 chunk +8 lines, -1 line 0 comments Download
M Source/core/page/PageAnimator.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/page/PageAnimator.cpp View 2 chunks +22 lines, -2 lines 0 comments Download
M Source/core/rendering/compositing/RenderLayerCompositor.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/rendering/compositing/RenderLayerCompositor.cpp View 1 2 3 4 5 3 chunks +21 lines, -3 lines 0 comments Download
M Source/web/PageWidgetDelegate.cpp View 1 2 3 4 5 1 chunk +2 lines, -13 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
chrishtr
The same as what we discussed, except for the sadness about updateCompositingLayers sometimes adding on ...
6 years, 9 months ago (2014-03-19 17:47:52 UTC) #1
abarth-chromium
> will set *new* dirty bits when updating direct compositing reasons Yes, that's craziness that ...
6 years, 9 months ago (2014-03-19 17:50:33 UTC) #2
abarth-chromium
lgtm https://codereview.chromium.org/202533003/diff/2/Source/core/rendering/compositing/RenderLayerCompositor.cpp File Source/core/rendering/compositing/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/202533003/diff/2/Source/core/rendering/compositing/RenderLayerCompositor.cpp#newcode416 Source/core/rendering/compositing/RenderLayerCompositor.cpp:416: m_renderView.frameView()->scheduleAnimation(); Should we early return here? https://codereview.chromium.org/202533003/diff/2/Source/core/rendering/compositing/RenderLayerCompositor.cpp#newcode423 Source/core/rendering/compositing/RenderLayerCompositor.cpp:423: ...
6 years, 9 months ago (2014-03-19 18:04:57 UTC) #3
chrishtr
https://codereview.chromium.org/202533003/diff/2/Source/core/rendering/compositing/RenderLayerCompositor.cpp File Source/core/rendering/compositing/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/202533003/diff/2/Source/core/rendering/compositing/RenderLayerCompositor.cpp#newcode416 Source/core/rendering/compositing/RenderLayerCompositor.cpp:416: m_renderView.frameView()->scheduleAnimation(); On 2014/03/19 18:04:57, abarth wrote: > Should we ...
6 years, 9 months ago (2014-03-19 18:15:59 UTC) #4
abarth-chromium
https://codereview.chromium.org/202533003/diff/50001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/202533003/diff/50001/Source/core/frame/FrameView.cpp#newcode2797 Source/core/frame/FrameView.cpp:2797: view->compositor()->scheduleAnimationIfNeeded(); Would you be willing to file a bug ...
6 years, 9 months ago (2014-03-19 18:26:09 UTC) #5
chrishtr
https://codereview.chromium.org/202533003/diff/50001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/202533003/diff/50001/Source/core/frame/FrameView.cpp#newcode2797 Source/core/frame/FrameView.cpp:2797: view->compositor()->scheduleAnimationIfNeeded(); On 2014/03/19 18:26:11, abarth wrote: > Would you ...
6 years, 9 months ago (2014-03-19 18:31:13 UTC) #6
chrishtr
The CQ bit was checked by chrishtr@chromium.org
6 years, 9 months ago (2014-03-19 20:12:45 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/202533003/20002
6 years, 9 months ago (2014-03-19 20:12:50 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-19 20:16:05 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-19 20:16:06 UTC) #10
chrishtr
The CQ bit was checked by chrishtr@chromium.org
6 years, 9 months ago (2014-03-19 20:18:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/202533003/20002
6 years, 9 months ago (2014-03-19 20:18:51 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-19 20:21:47 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-19 20:21:47 UTC) #14
chrishtr
The CQ bit was checked by chrishtr@chromium.org
6 years, 9 months ago (2014-03-20 16:00:51 UTC) #15
chrishtr
The CQ bit was unchecked by chrishtr@chromium.org
6 years, 9 months ago (2014-03-20 16:00:54 UTC) #16
chrishtr
The CQ bit was checked by chrishtr@chromium.org
6 years, 9 months ago (2014-03-20 16:03:11 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/202533003/20002
6 years, 9 months ago (2014-03-20 16:03:14 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-20 16:35:40 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 9 months ago (2014-03-20 16:35:41 UTC) #20
chrishtr
The CQ bit was checked by chrishtr@chromium.org
6 years, 9 months ago (2014-03-20 18:16:05 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/202533003/70001
6 years, 9 months ago (2014-03-20 18:16:13 UTC) #22
commit-bot: I haz the power
6 years, 9 months ago (2014-03-20 18:17:31 UTC) #23
Message was sent while issue was closed.
Change committed as 169672

Powered by Google App Engine
This is Rietveld 408576698