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

Side by Side Diff: cc/tree_synchronizer_unittest.cc

Issue 12517003: cc: Chromify the Animation and LayerAnimationController classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « cc/top_controls_manager.cc ('k') | content/renderer/gpu/render_widget_compositor.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/tree_synchronizer.h" 5 #include "cc/tree_synchronizer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "cc/layer.h" 9 #include "cc/layer.h"
10 #include "cc/layer_animation_controller.h" 10 #include "cc/layer_animation_controller.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 bool synchronizedAnimations() const { return m_synchronizedAnimations; } 84 bool synchronizedAnimations() const { return m_synchronizedAnimations; }
85 85
86 private: 86 private:
87 FakeLayerAnimationController() 87 FakeLayerAnimationController()
88 : LayerAnimationController(1) 88 : LayerAnimationController(1)
89 , m_synchronizedAnimations(false) 89 , m_synchronizedAnimations(false)
90 { } 90 { }
91 91
92 virtual ~FakeLayerAnimationController() { } 92 virtual ~FakeLayerAnimationController() { }
93 93
94 virtual void pushAnimationUpdatesTo(LayerAnimationController* controllerImpl ) OVERRIDE 94 virtual void PushAnimationUpdatesTo(LayerAnimationController* controllerImpl ) OVERRIDE
95 { 95 {
96 LayerAnimationController::pushAnimationUpdatesTo(controllerImpl); 96 LayerAnimationController::PushAnimationUpdatesTo(controllerImpl);
97 m_synchronizedAnimations = true; 97 m_synchronizedAnimations = true;
98 } 98 }
99 99
100 bool m_synchronizedAnimations; 100 bool m_synchronizedAnimations;
101 }; 101 };
102 102
103 void expectTreesAreIdentical(Layer* layer, LayerImpl* layerImpl, LayerTreeImpl* treeImpl) 103 void expectTreesAreIdentical(Layer* layer, LayerImpl* layerImpl, LayerTreeImpl* treeImpl)
104 { 104 {
105 ASSERT_TRUE(layer); 105 ASSERT_TRUE(layer);
106 ASSERT_TRUE(layerImpl); 106 ASSERT_TRUE(layerImpl);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees (layerTreeRoot.get(), scoped_ptr<LayerImpl>(), m_hostImpl.activeTree()); 395 scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees (layerTreeRoot.get(), scoped_ptr<LayerImpl>(), m_hostImpl.activeTree());
396 TreeSynchronizer::pushProperties(layerTreeRoot.get(), layerImplTreeRoot.get( )); 396 TreeSynchronizer::pushProperties(layerTreeRoot.get(), layerImplTreeRoot.get( ));
397 layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), layerImplTreeRoot.Pass(), m_hostImpl.activeTree()); 397 layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), layerImplTreeRoot.Pass(), m_hostImpl.activeTree());
398 398
399 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layerA nimationController())->synchronizedAnimations()); 399 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layerA nimationController())->synchronizedAnimations());
400 } 400 }
401 401
402 } // namespace 402 } // namespace
403 } // namespace cc 403 } // namespace cc
OLDNEW
« no previous file with comments | « cc/top_controls_manager.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698