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

Issue 2780823002: Uses copy request to flatten the layers to do screen rotation animation. (Closed)

Created:
3 years, 8 months ago by wutao
Modified:
3 years, 8 months ago
CC:
chromium-reviews, kalyank, srahim+watch_chromium.org, sadrul, asvitkine+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Uses copy request to flatten the layers to do screen rotation animation. Currently we clone all the layers to do animation during screen rotation, which is slow on some of the devices. The solution is using compositor copy request to flatten the layer hierarchy and make animations more efficient. BUG=678763 R=oshima@chromium.org, bruthig@chromium.org TEST=Unittest with ScreenRotationAnimatorTest and Manual Review-Url: https://codereview.chromium.org/2780823002 Cr-Commit-Position: refs/heads/master@{#462658} Committed: https://chromium.googlesource.com/chromium/src/+/2c0ca180a3b0db00edd152ed5b2a703942d84163

Patch Set 1 #

Total comments: 10

Patch Set 2 : Rebase and fix nits. #

Patch Set 3 : Remove duplicated entry in flags. #

Total comments: 16

Patch Set 4 : Document corner cases. #

Patch Set 5 : Add tests for enable_smooth_screen_rotation code path. #

Total comments: 6

Patch Set 6 : Change the test. #

Total comments: 12

Patch Set 7 : Fix nits in patch 6. #

Total comments: 2

Patch Set 8 : Fix nit in patch 7 and rebase. #

Patch Set 9 : Updated the value in histogram.xml. #

Patch Set 10 : Resolve merge conflicts. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -32 lines) Patch
M ash/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M ash/common/ash_switches.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ash/common/ash_switches.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ash/rotator/screen_rotation_animator.h View 1 2 3 4 5 6 7 3 chunks +43 lines, -3 lines 0 comments Download
M ash/rotator/screen_rotation_animator.cc View 1 2 3 4 5 6 7 8 9 7 chunks +81 lines, -22 lines 0 comments Download
M ash/rotator/screen_rotation_animator_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +128 lines, -7 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/flag_descriptions.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/flag_descriptions.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 61 (32 generated)
wutao
Hi Ben, Could you please have a look first? Not much new code, most are ...
3 years, 8 months ago (2017-03-28 16:08:39 UTC) #2
bruthig
Overall looks good. I've left some suggestions but feel free to add OWNERs now. It ...
3 years, 8 months ago (2017-03-30 18:28:24 UTC) #3
bruthig
lgtm
3 years, 8 months ago (2017-03-30 18:43:52 UTC) #4
wutao
Hi jam@: Please review changes in chrome/browser/about_flags.cc chrome/browser/flag_descriptions.cc chrome/browser/flag_descriptions.h Hi mpearson@: Please review changes in ...
3 years, 8 months ago (2017-03-30 21:25:41 UTC) #6
wutao
Hi Lei, Please review changes in: chrome/browser/about_flags.cc chrome/browser/flag_descriptions.cc chrome/browser/flag_descriptions.h Thanks, Tao
3 years, 8 months ago (2017-03-30 22:00:10 UTC) #8
Lei Zhang
chrome/ lgtm
3 years, 8 months ago (2017-03-30 22:11:58 UTC) #9
oshima
https://codereview.chromium.org/2780823002/diff/40001/ash/common/ash_switches.cc File ash/common/ash_switches.cc (right): https://codereview.chromium.org/2780823002/diff/40001/ash/common/ash_switches.cc#newcode66 ash/common/ash_switches.cc:66: "ash-enable-smooth-screen-rotation-animation"; you may omit "Animation/-animation" as it's obvious. up ...
3 years, 8 months ago (2017-03-31 00:14:34 UTC) #10
Mark P
histograms.xml lgtm
3 years, 8 months ago (2017-03-31 17:22:53 UTC) #11
wutao
Hi Dana, Could you please help to answer this question so that I can document ...
3 years, 8 months ago (2017-04-03 16:16:04 UTC) #13
danakj
https://codereview.chromium.org/2780823002/diff/40001/ash/rotator/screen_rotation_animator.cc File ash/rotator/screen_rotation_animator.cc (right): https://codereview.chromium.org/2780823002/diff/40001/ash/rotator/screen_rotation_animator.cc#newcode243 ash/rotator/screen_rotation_animator.cc:243: // If copy request does not succeeded, fall back ...
3 years, 8 months ago (2017-04-03 16:23:30 UTC) #14
danakj
https://codereview.chromium.org/2780823002/diff/40001/ash/rotator/screen_rotation_animator.cc File ash/rotator/screen_rotation_animator.cc (right): https://codereview.chromium.org/2780823002/diff/40001/ash/rotator/screen_rotation_animator.cc#newcode235 ash/rotator/screen_rotation_animator.cc:235: weak_factory_.GetWeakPtr(), base::Passed(&rotation_request))); On 2017/03/31 00:14:34, oshima wrote: > do ...
3 years, 8 months ago (2017-04-03 16:25:04 UTC) #15
oshima
https://codereview.chromium.org/2780823002/diff/40001/ash/rotator/screen_rotation_animator.cc File ash/rotator/screen_rotation_animator.cc (right): https://codereview.chromium.org/2780823002/diff/40001/ash/rotator/screen_rotation_animator.cc#newcode266 ash/rotator/screen_rotation_animator.cc:266: copy_layer->SetBounds(rect); On 2017/04/03 16:16:04, wutao wrote: > On 2017/03/31 ...
3 years, 8 months ago (2017-04-03 16:36:11 UTC) #16
wutao
Hi Oshima, Could you please have a look again. Thank you. Tao https://codereview.chromium.org/2780823002/diff/40001/ash/rotator/screen_rotation_animator.cc File ash/rotator/screen_rotation_animator.cc ...
3 years, 8 months ago (2017-04-03 17:53:38 UTC) #17
wutao
Hi Oshima, Tests are added to simulate the situation of removing the rotating display in ...
3 years, 8 months ago (2017-04-04 06:19:25 UTC) #22
oshima
https://codereview.chromium.org/2780823002/diff/80001/ash/rotator/screen_rotation_animator.cc File ash/rotator/screen_rotation_animator.cc (right): https://codereview.chromium.org/2780823002/diff/80001/ash/rotator/screen_rotation_animator.cc#newcode216 ash/rotator/screen_rotation_animator.cc:216: enable_smooth_rotation_for_test_) { you can just add the switch in ...
3 years, 8 months ago (2017-04-04 20:23:13 UTC) #23
wutao
Hi Oshima, Changed the why to call test as you suggested. Thank you, Tao https://codereview.chromium.org/2780823002/diff/80001/ash/rotator/screen_rotation_animator.cc ...
3 years, 8 months ago (2017-04-05 00:09:22 UTC) #24
oshima
https://codereview.chromium.org/2780823002/diff/100001/ash/rotator/screen_rotation_animator.h File ash/rotator/screen_rotation_animator.h (right): https://codereview.chromium.org/2780823002/diff/100001/ash/rotator/screen_rotation_animator.h#newcode74 ash/rotator/screen_rotation_animator.h:74: virtual base::Callback<void(std::unique_ptr<cc::CopyOutputResult> result)> using CopyCallback = OnceCallback<....> https://codereview.chromium.org/2780823002/diff/100001/ash/rotator/screen_rotation_animator_unittest.cc File ...
3 years, 8 months ago (2017-04-05 01:55:43 UTC) #25
wutao
Hi Oshima, Please look again the new changes. Thank you. Tao https://codereview.chromium.org/2780823002/diff/100001/ash/rotator/screen_rotation_animator.h File ash/rotator/screen_rotation_animator.h (right): ...
3 years, 8 months ago (2017-04-05 07:41:57 UTC) #26
oshima
ash lgtm Please make sure the test fails without display check in OnRootLayerCopiedBeforeRotation. https://codereview.chromium.org/2780823002/diff/120001/ash/rotator/screen_rotation_animator.h File ...
3 years, 8 months ago (2017-04-05 19:02:03 UTC) #29
wutao
On 2017/04/05 19:02:03, oshima wrote: > ash lgtm > > Please make sure the test ...
3 years, 8 months ago (2017-04-05 20:52:19 UTC) #33
wutao
Rebased and ready to commit. https://codereview.chromium.org/2780823002/diff/120001/ash/rotator/screen_rotation_animator.h File ash/rotator/screen_rotation_animator.h (right): https://codereview.chromium.org/2780823002/diff/120001/ash/rotator/screen_rotation_animator.h#newcode82 ash/rotator/screen_rotation_animator.h:82: std::unique_ptr<cc::CopyOutputResult> result); On 2017/04/05 ...
3 years, 8 months ago (2017-04-05 20:53:08 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2780823002/160001
3 years, 8 months ago (2017-04-05 23:46:33 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/403811)
3 years, 8 months ago (2017-04-06 00:03:52 UTC) #44
wutao
Hi Dana, Please check if I can add '+cc/output' to the DEPS. A work around ...
3 years, 8 months ago (2017-04-06 00:14:28 UTC) #45
danakj
DEPS LGTM
3 years, 8 months ago (2017-04-06 17:43:21 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2780823002/160001
3 years, 8 months ago (2017-04-06 17:45:00 UTC) #48
commit-bot: I haz the power
Failed to apply patch for ash/rotator/screen_rotation_animator.cc: While running git apply --index -3 -p1; error: patch ...
3 years, 8 months ago (2017-04-06 19:11:33 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2780823002/180001
3 years, 8 months ago (2017-04-06 20:39:37 UTC) #58
commit-bot: I haz the power
3 years, 8 months ago (2017-04-06 22:41:50 UTC) #61
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/2c0ca180a3b0db00edd152ed5b2a...

Powered by Google App Engine
This is Rietveld 408576698