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

Side by Side Diff: ui/compositor/layer.cc

Issue 1536833004: CC Animations: Enable external animation host for ui::Compositor (Aura) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@player2animator
Patch Set: Rebase. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/compositor/compositor_switches.cc ('k') | ui/compositor/test/test_suite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/compositor/compositor_switches.cc ('k') | ui/compositor/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698