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

Issue 2550933002: Make all LayerAnimationElement::Create*Element return unique_ptr (Closed)

Created:
4 years ago by Sunny
Modified:
4 years ago
Reviewers:
loyso (OOO), sky
CC:
chromium-reviews, danakj+watch_chromium.org, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, sadrul, Ian Vollick
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Also made change to LayerAnimationSequence, replace raw pointer with unique_ptr to stress ownership transfer behavior. And replace linked_ptr with unique_ptr in LayerAnimationSequence. BUG=556939 Committed: https://crrev.com/bd5087e031d189ae2292b7cd05d846961ae086a5 Cr-Commit-Position: refs/heads/master@{#439326}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Make all LayerAnimationElement::Create*Element return unique_ptr #

Total comments: 2

Patch Set 3 : More changes #

Patch Set 4 : Fix conflict with another patch made by myself #

Patch Set 5 : More change and typo fix #

Total comments: 2

Patch Set 6 : Complete inclusion #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+316 lines, -276 lines) Patch
M ash/accelerators/accelerator_controller_delegate_aura.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M ash/rotator/screen_rotation_animation.cc View 1 2 3 4 5 2 chunks +6 lines, -4 lines 0 comments Download
M ash/rotator/screen_rotation_animation_unittest.cc View 1 2 2 chunks +11 lines, -11 lines 0 comments Download
M ash/rotator/screen_rotation_animator.cc View 1 2 3 4 5 3 chunks +12 lines, -10 lines 0 comments Download
M ash/rotator/window_rotation.cc View 1 2 3 4 5 2 chunks +16 lines, -14 lines 0 comments Download
M ash/wm/session_state_animator_impl.cc View 1 2 3 4 5 2 chunks +11 lines, -10 lines 0 comments Download
M ash/wm/window_animations.cc View 1 2 3 4 5 3 chunks +21 lines, -20 lines 0 comments Download
M ui/app_list/views/pulsing_block_view.cc View 1 2 3 4 5 2 chunks +6 lines, -4 lines 0 comments Download
M ui/compositor/layer_animation_element.h View 1 2 3 4 5 3 chunks +12 lines, -10 lines 0 comments Download
M ui/compositor/layer_animation_element.cc View 1 2 3 4 5 3 chunks +41 lines, -39 lines 0 comments Download
M ui/compositor/layer_animation_element_unittest.cc View 1 9 chunks +18 lines, -18 lines 0 comments Download
M ui/compositor/layer_animation_sequence.h View 1 2 3 4 5 4 chunks +5 lines, -4 lines 0 comments Download
M ui/compositor/layer_animation_sequence.cc View 1 3 chunks +6 lines, -4 lines 3 comments Download
M ui/compositor/layer_animator.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M ui/compositor/layer_animator_unittest.cc View 1 2 3 4 5 5 chunks +13 lines, -11 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M ui/gfx/interpolated_transform.h View 1 2 3 4 5 2 chunks +11 lines, -8 lines 0 comments Download
M ui/gfx/interpolated_transform.cc View 1 2 3 4 5 4 chunks +22 lines, -18 lines 0 comments Download
M ui/gfx/interpolated_transform_unittest.cc View 1 2 3 4 5 5 chunks +34 lines, -32 lines 0 comments Download
M ui/views/animation/flood_fill_ink_drop_ripple.cc View 1 2 chunks +6 lines, -4 lines 0 comments Download
M ui/views/animation/ink_drop_highlight.cc View 1 1 chunk +6 lines, -4 lines 0 comments Download
M ui/views/animation/square_ink_drop_ripple.cc View 1 3 chunks +6 lines, -6 lines 0 comments Download
M ui/wm/core/window_animations.cc View 1 2 3 4 5 5 chunks +43 lines, -39 lines 0 comments Download
M ui/wm/core/window_animations_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (25 generated)
loyso (OOO)
https://codereview.chromium.org/2550933002/diff/1/ash/wm/session_state_animator_impl.cc File ash/wm/session_state_animator_impl.cc (right): https://codereview.chromium.org/2550933002/diff/1/ash/wm/session_state_animator_impl.cc#newcode257 ash/wm/session_state_animator_impl.cc:257: ui::LayerAnimationSequence* brightness_sequence = Use auto and MakeUnique and std::move ...
4 years ago (2016-12-06 04:21:56 UTC) #3
loyso (OOO)
https://codereview.chromium.org/2550933002/diff/1/ash/wm/session_state_animator_impl.cc File ash/wm/session_state_animator_impl.cc (right): https://codereview.chromium.org/2550933002/diff/1/ash/wm/session_state_animator_impl.cc#newcode263 ash/wm/session_state_animator_impl.cc:263: ui::LayerAnimationElement::CreateBrightnessElement(target, duration); It's better for Create*Element methods to use ...
4 years ago (2016-12-06 04:25:17 UTC) #4
Sunny
https://codereview.chromium.org/2550933002/diff/1/ash/wm/session_state_animator_impl.cc File ash/wm/session_state_animator_impl.cc (right): https://codereview.chromium.org/2550933002/diff/1/ash/wm/session_state_animator_impl.cc#newcode257 ash/wm/session_state_animator_impl.cc:257: ui::LayerAnimationSequence* brightness_sequence = On 2016/12/06 04:21:56, loyso wrote: > ...
4 years ago (2016-12-06 06:21:05 UTC) #5
loyso (OOO)
https://codereview.chromium.org/2550933002/diff/1/ash/wm/session_state_animator_impl.cc File ash/wm/session_state_animator_impl.cc (right): https://codereview.chromium.org/2550933002/diff/1/ash/wm/session_state_animator_impl.cc#newcode257 ash/wm/session_state_animator_impl.cc:257: ui::LayerAnimationSequence* brightness_sequence = Thanks for working on this, Sunny! ...
4 years ago (2016-12-06 06:32:35 UTC) #6
loyso (OOO)
Yeah. You can limit this CL to move semantics for LayerAnimationElement only. Leave LayerAnimationSequence as-is ...
4 years ago (2016-12-06 06:50:53 UTC) #7
Sunny
On 2016/12/06 06:50:53, loyso wrote: > Yeah. You can limit this CL to move semantics ...
4 years ago (2016-12-07 17:59:01 UTC) #10
loyso (OOO)
I would use auto for Create*Element results but I know that sky@ prefers explicitness. I ...
4 years ago (2016-12-08 00:05:21 UTC) #11
Sunny
On 2016/12/08 00:05:21, loyso wrote: > I would use auto for Create*Element results but I ...
4 years ago (2016-12-08 15:35:44 UTC) #16
Sunny
On 2016/12/08 00:05:21, loyso wrote: > I would use auto for Create*Element results but I ...
4 years ago (2016-12-09 09:33:16 UTC) #21
Sunny
Hi loyso@ New patch uploaded, and that's too bad I don't have windows and linux ...
4 years ago (2016-12-12 10:38:43 UTC) #26
loyso (OOO)
ui/compositor/ *animat* LGTM with a nit: https://codereview.chromium.org/2550933002/diff/80001/ui/compositor/layer_animation_element.cc File ui/compositor/layer_animation_element.cc (right): https://codereview.chromium.org/2550933002/diff/80001/ui/compositor/layer_animation_element.cc#newcode604 ui/compositor/layer_animation_element.cc:604: return base::MakeUnique<ThreadedTransformTransition>(transform, duration); ...
4 years ago (2016-12-13 02:24:50 UTC) #31
loyso (OOO)
https://codereview.chromium.org/2550933002/diff/80001/ui/compositor/layer_animation_sequence.h File ui/compositor/layer_animation_sequence.h (left): https://codereview.chromium.org/2550933002/diff/80001/ui/compositor/layer_animation_sequence.h#oldcode140 ui/compositor/layer_animation_sequence.h:140: typedef std::vector<linked_ptr<LayerAnimationElement> > Elements; Could you erase linked_ptr include ...
4 years ago (2016-12-13 02:26:54 UTC) #32
Sunny
On 2016/12/13 02:26:54, loyso wrote: > https://codereview.chromium.org/2550933002/diff/80001/ui/compositor/layer_animation_sequence.h > File ui/compositor/layer_animation_sequence.h (left): > > https://codereview.chromium.org/2550933002/diff/80001/ui/compositor/layer_animation_sequence.h#oldcode140 > ...
4 years ago (2016-12-15 08:26:25 UTC) #33
sky
LGTM https://codereview.chromium.org/2550933002/diff/100001/ui/compositor/layer_animation_sequence.cc File ui/compositor/layer_animation_sequence.cc (right): https://codereview.chromium.org/2550933002/diff/100001/ui/compositor/layer_animation_sequence.cc#newcode189 ui/compositor/layer_animation_sequence.cc:189: elements_.push_back(std::move(element)); push_back->emplace_back?
4 years ago (2016-12-15 16:42:18 UTC) #34
Sunny
https://codereview.chromium.org/2550933002/diff/100001/ui/compositor/layer_animation_sequence.cc File ui/compositor/layer_animation_sequence.cc (right): https://codereview.chromium.org/2550933002/diff/100001/ui/compositor/layer_animation_sequence.cc#newcode189 ui/compositor/layer_animation_sequence.cc:189: elements_.push_back(std::move(element)); On 2016/12/15 16:42:18, sky wrote: > push_back->emplace_back? Emm...Do ...
4 years ago (2016-12-16 10:53:49 UTC) #35
danakj
driveby thots https://codereview.chromium.org/2550933002/diff/100001/ui/compositor/layer_animation_sequence.cc File ui/compositor/layer_animation_sequence.cc (right): https://codereview.chromium.org/2550933002/diff/100001/ui/compositor/layer_animation_sequence.cc#newcode189 ui/compositor/layer_animation_sequence.cc:189: elements_.push_back(std::move(element)); On 2016/12/16 10:53:49, Sunny wrote: > ...
4 years ago (2016-12-16 14:20:31 UTC) #36
sky
LGTM then
4 years ago (2016-12-16 17:13:06 UTC) #37
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/2550933002/100001
4 years ago (2016-12-17 03:46:23 UTC) #40
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-17 05:20:30 UTC) #43
commit-bot: I haz the power
4 years ago (2016-12-17 05:22:50 UTC) #45
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/bd5087e031d189ae2292b7cd05d846961ae086a5
Cr-Commit-Position: refs/heads/master@{#439326}

Powered by Google App Engine
This is Rietveld 408576698