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

Side by Side Diff: cc/CCLayerTreeHostTest.cpp

Issue 11085029: [cc] Use base ptr types for cc's CSS animation classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/CCLayerImpl.h ('k') | cc/CCTimingFunction.h » ('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 "config.h" 5 #include "config.h"
6 6
7 #include "CCLayerTreeHost.h" 7 #include "CCLayerTreeHost.h"
8 8
9 #include "CCGeometryTestUtils.h" 9 #include "CCGeometryTestUtils.h"
10 #include "CCGraphicsContext.h" 10 #include "CCGraphicsContext.h"
(...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 } 2181 }
2182 2182
2183 virtual void beginTest() OVERRIDE 2183 virtual void beginTest() OVERRIDE
2184 { 2184 {
2185 EXPECT_FALSE(m_addedAnimation); 2185 EXPECT_FALSE(m_addedAnimation);
2186 2186
2187 scoped_refptr<LayerChromium> layer = LayerChromium::create(); 2187 scoped_refptr<LayerChromium> layer = LayerChromium::create();
2188 layer->setLayerAnimationDelegate(this); 2188 layer->setLayerAnimationDelegate(this);
2189 2189
2190 // Any valid CCAnimationCurve will do here. 2190 // Any valid CCAnimationCurve will do here.
2191 OwnPtr<CCAnimationCurve> curve(CCEaseTimingFunction::create()); 2191 scoped_ptr<CCAnimationCurve> curve(CCEaseTimingFunction::create());
2192 OwnPtr<CCActiveAnimation> animation(CCActiveAnimation::create(curve.rele ase(), 1, 1, CCActiveAnimation::Opacity)); 2192 scoped_ptr<CCActiveAnimation> animation(CCActiveAnimation::create(curve. Pass(), 1, 1, CCActiveAnimation::Opacity));
2193 layer->layerAnimationController()->addAnimation(animation.release()); 2193 layer->layerAnimationController()->addAnimation(animation.Pass());
2194 2194
2195 // We add the animation *before* attaching the layer to the tree. 2195 // We add the animation *before* attaching the layer to the tree.
2196 m_layerTreeHost->rootLayer()->addChild(layer); 2196 m_layerTreeHost->rootLayer()->addChild(layer);
2197 EXPECT_TRUE(m_addedAnimation); 2197 EXPECT_TRUE(m_addedAnimation);
2198 2198
2199 endTest(); 2199 endTest();
2200 } 2200 }
2201 2201
2202 virtual void didAddAnimation() OVERRIDE 2202 virtual void didAddAnimation() OVERRIDE
2203 { 2203 {
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
2994 int m_numCommitComplete; 2994 int m_numCommitComplete;
2995 int m_numDrawLayers; 2995 int m_numDrawLayers;
2996 }; 2996 };
2997 2997
2998 TEST_F(CCLayerTreeHostTestContinuousAnimate, runMultiThread) 2998 TEST_F(CCLayerTreeHostTestContinuousAnimate, runMultiThread)
2999 { 2999 {
3000 runTest(true); 3000 runTest(true);
3001 } 3001 }
3002 3002
3003 } // namespace 3003 } // namespace
OLDNEW
« no previous file with comments | « cc/CCLayerImpl.h ('k') | cc/CCTimingFunction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698