OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/compositor/layer.h" | 5 #include "ui/compositor/layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // static | 123 // static |
124 const cc::LayerSettings& Layer::UILayerSettings() { | 124 const cc::LayerSettings& Layer::UILayerSettings() { |
125 return g_ui_layer_settings.Get(); | 125 return g_ui_layer_settings.Get(); |
126 } | 126 } |
127 | 127 |
128 // static | 128 // static |
129 void Layer::InitializeUILayerSettings() { | 129 void Layer::InitializeUILayerSettings() { |
130 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 130 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
131 g_ui_layer_settings.Get().use_compositor_animation_timelines = | 131 g_ui_layer_settings.Get().use_compositor_animation_timelines = |
132 !command_line->HasSwitch( | 132 command_line->HasSwitch( |
133 switches::kUIDisableCompositorAnimationTimelines); | 133 switches::kUIEnableCompositorAnimationTimelines); |
134 } | 134 } |
135 | 135 |
136 const Compositor* Layer::GetCompositor() const { | 136 const Compositor* Layer::GetCompositor() const { |
137 return GetRoot(this)->compositor_; | 137 return GetRoot(this)->compositor_; |
138 } | 138 } |
139 | 139 |
140 float Layer::opacity() const { | 140 float Layer::opacity() const { |
141 return cc_layer_->opacity(); | 141 return cc_layer_->opacity(); |
142 } | 142 } |
143 | 143 |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 animator_->ResetCompositor(compositor); | 1098 animator_->ResetCompositor(compositor); |
1099 if (animator_->is_animating()) | 1099 if (animator_->is_animating()) |
1100 animator_->RemoveFromCollection(collection); | 1100 animator_->RemoveFromCollection(collection); |
1101 } | 1101 } |
1102 | 1102 |
1103 for (auto* child : children_) | 1103 for (auto* child : children_) |
1104 child->ResetCompositorForAnimatorsInTree(compositor); | 1104 child->ResetCompositorForAnimatorsInTree(compositor); |
1105 } | 1105 } |
1106 | 1106 |
1107 } // namespace ui | 1107 } // namespace ui |
OLD | NEW |