| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 | 126 |
| 127 // static | 127 // static |
| 128 const cc::LayerSettings& Layer::UILayerSettings() { | 128 const cc::LayerSettings& Layer::UILayerSettings() { |
| 129 return g_ui_layer_settings.Get(); | 129 return g_ui_layer_settings.Get(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 // static | 132 // static |
| 133 void Layer::InitializeUILayerSettings() { | 133 void Layer::InitializeUILayerSettings() { |
| 134 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 134 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 135 if (command_line->HasSwitch(switches::kUIEnableCompositorAnimationTimelines)) | 135 g_ui_layer_settings.Get().use_compositor_animation_timelines = |
| 136 g_ui_layer_settings.Get().use_compositor_animation_timelines = true; | 136 !command_line->HasSwitch( |
| 137 switches::kUIDisableCompositorAnimationTimelines); |
| 137 } | 138 } |
| 138 | 139 |
| 139 const Compositor* Layer::GetCompositor() const { | 140 const Compositor* Layer::GetCompositor() const { |
| 140 return GetRoot(this)->compositor_; | 141 return GetRoot(this)->compositor_; |
| 141 } | 142 } |
| 142 | 143 |
| 143 float Layer::opacity() const { | 144 float Layer::opacity() const { |
| 144 return cc_layer_->opacity(); | 145 return cc_layer_->opacity(); |
| 145 } | 146 } |
| 146 | 147 |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 animator_->ResetCompositor(compositor); | 1098 animator_->ResetCompositor(compositor); |
| 1098 if (animator_->is_animating()) | 1099 if (animator_->is_animating()) |
| 1099 animator_->RemoveFromCollection(collection); | 1100 animator_->RemoveFromCollection(collection); |
| 1100 } | 1101 } |
| 1101 | 1102 |
| 1102 for (auto* child : children_) | 1103 for (auto* child : children_) |
| 1103 child->ResetCompositorForAnimatorsInTree(compositor); | 1104 child->ResetCompositorForAnimatorsInTree(compositor); |
| 1104 } | 1105 } |
| 1105 | 1106 |
| 1106 } // namespace ui | 1107 } // namespace ui |
| OLD | NEW |