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

Issue 1698813002: CC Animation: Expose TargetProperty enum to be aliased in Blink Platform. (Closed)

Created:
4 years, 10 months ago by loyso (OOO)
Modified:
4 years, 10 months ago
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CC Animation: Expose TargetProperty enum to be aliased in Blink Platform. AN UNFINISHED DEMO. AnimationTargetProperty is intended to be used as an alias in Source/platform/animation/CompositorAnimationTargetProperty.h It demonstrates all the problems with strongly typed enums: 1) ostream support needed (logging): DCHECK(animation->target_property() != AnimationTargetProperty::SCROLL_OFFSET) to work. Pros: it will be logged with its string value instead of integer value for old-style enums. 2) hash support needed. (See the usage in LayerAnimationController) (C++14 addresses this with DR2148) 3) array indexing: static_casts or helper functions. (See the problems in animation_timelines_test_common.*) Consider an alternative approach: https://codereview.chromium.org/1700653002 BUG=577016 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use custom hash in unordered_set. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+667 lines, -503 lines) Patch
M cc/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/animation/animation.h View 5 chunks +5 lines, -14 lines 0 comments Download
M cc/animation/animation.cc View 4 chunks +4 lines, -19 lines 0 comments Download
M cc/animation/animation_delegate.h View 1 chunk +5 lines, -6 lines 0 comments Download
M cc/animation/animation_events.h View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/animation/animation_events.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M cc/animation/animation_host.h View 1 chunk +2 lines, -3 lines 0 comments Download
M cc/animation/animation_host.cc View 12 chunks +31 lines, -19 lines 0 comments Download
M cc/animation/animation_player.h View 1 chunk +4 lines, -4 lines 0 comments Download
M cc/animation/animation_player.cc View 5 chunks +6 lines, -6 lines 0 comments Download
M cc/animation/animation_player_unittest.cc View 3 chunks +15 lines, -15 lines 0 comments Download
A cc/animation/animation_target_property.h View 1 1 chunk +39 lines, -0 lines 1 comment Download
A cc/animation/animation_target_property.cc View 1 chunk +34 lines, -0 lines 0 comments Download
M cc/animation/animation_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/animation/element_animations.h View 1 chunk +3 lines, -3 lines 0 comments Download
M cc/animation/element_animations.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M cc/animation/layer_animation_controller.h View 1 4 chunks +6 lines, -5 lines 1 comment Download
M cc/animation/layer_animation_controller.cc View 31 chunks +47 lines, -44 lines 0 comments Download
M cc/animation/layer_animation_controller_unittest.cc View 82 chunks +260 lines, -185 lines 0 comments Download
M cc/blink/web_to_cc_animation_delegate_adapter.h View 1 chunk +3 lines, -3 lines 0 comments Download
M cc/blink/web_to_cc_animation_delegate_adapter.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M cc/cc.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layers/layer.h View 1 chunk +1 line, -2 lines 0 comments Download
M cc/layers/layer.cc View 8 chunks +11 lines, -8 lines 0 comments Download
M cc/layers/layer_impl.h View 2 chunks +4 lines, -5 lines 0 comments Download
M cc/layers/layer_impl.cc View 12 chunks +19 lines, -20 lines 0 comments Download
M cc/layers/layer_unittest.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M cc/test/animation_test_common.h View 1 chunk +3 lines, -4 lines 0 comments Download
M cc/test/animation_test_common.cc View 5 chunks +9 lines, -10 lines 0 comments Download
M cc/test/animation_timelines_test_common.h View 4 chunks +17 lines, -11 lines 0 comments Download
M cc/test/animation_timelines_test_common.cc View 6 chunks +9 lines, -10 lines 0 comments Download
M cc/test/test_hooks.h View 1 chunk +3 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 chunk +2 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 6 chunks +13 lines, -13 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 22 chunks +41 lines, -31 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation_timelines.cc View 16 chunks +40 lines, -30 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 chunk +2 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/property_tree_builder.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 20 (9 generated)
loyso (OOO)
PTAL! Which approach is better? https://codereview.chromium.org/1698813002/diff/1/cc/animation/animation_target_property.h File cc/animation/animation_target_property.h (right): https://codereview.chromium.org/1698813002/diff/1/cc/animation/animation_target_property.h#newcode39 cc/animation/animation_target_property.h:39: } We need some ...
4 years, 10 months ago (2016-02-15 06:40:37 UTC) #4
loyso (OOO)
Any suggestions/opinions please?
4 years, 10 months ago (2016-02-15 22:52:48 UTC) #8
jbroman
This (and the comparison to the other) seem to me to be largely an issue ...
4 years, 10 months ago (2016-02-16 15:56:43 UTC) #11
ajuma
On 2016/02/15 06:40:37, loyso wrote: > PTAL! Which approach is better? I weakly prefer the ...
4 years, 10 months ago (2016-02-16 18:13:53 UTC) #12
loyso (OOO)
On 2016/02/16 15:56:43, jbroman wrote: > This (and the comparison to the other) seem to ...
4 years, 10 months ago (2016-02-16 23:20:28 UTC) #13
loyso (OOO)
On 2016/02/16 15:56:43, jbroman wrote: > http://chromium-cpp.appspot.com/ and the Google C++ style guide say we ...
4 years, 10 months ago (2016-02-17 00:22:58 UTC) #14
loyso (OOO)
https://codereview.chromium.org/1698813002/diff/20001/cc/animation/animation_target_property.h File cc/animation/animation_target_property.h (right): https://codereview.chromium.org/1698813002/diff/20001/cc/animation/animation_target_property.h#newcode30 cc/animation/animation_target_property.h:30: struct EnumClassHash { This can be shared somewhere in ...
4 years, 10 months ago (2016-02-17 00:23:06 UTC) #15
esprehn
https://codereview.chromium.org/1698813002/diff/20001/cc/animation/layer_animation_controller.h File cc/animation/layer_animation_controller.h (right): https://codereview.chromium.org/1698813002/diff/20001/cc/animation/layer_animation_controller.h#newcode179 cc/animation/layer_animation_controller.h:179: std::unordered_set<AnimationTargetProperty, EnumClassHash>; This could just be a bitset right? ...
4 years, 10 months ago (2016-02-17 00:40:11 UTC) #16
loyso (OOO)
On 2016/02/17 00:40:11, esprehn wrote: > std::unordered_set<AnimationTargetProperty, EnumClassHash>; > This could just be a bitset ...
4 years, 10 months ago (2016-02-17 00:51:16 UTC) #17
loyso (OOO)
On 2016/02/17 00:40:11, esprehn wrote: > std::unordered_set<AnimationTargetProperty, EnumClassHash>; > This could just be a bitset ...
4 years, 10 months ago (2016-02-17 05:23:50 UTC) #18
loyso (OOO)
4 years, 10 months ago (2016-02-21 22:56:29 UTC) #20
Closing this issue in favor for https://codereview.chromium.org/1700653002/

Powered by Google App Engine
This is Rietveld 408576698