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

Side by Side Diff: cc/CCActiveAnimation.cpp

Issue 10914268: Change cc files from namespace WebCore to cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 3 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/CCActiveAnimation.h ('k') | cc/CCActiveAnimationTest.cpp » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "config.h" 5 #include "config.h"
6 6
7 #include "CCActiveAnimation.h" 7 #include "CCActiveAnimation.h"
8 8
9 #include "CCAnimationCurve.h" 9 #include "CCAnimationCurve.h"
10 #include "TraceEvent.h" 10 #include "TraceEvent.h"
(...skipping 12 matching lines...) Expand all
23 "WaitingForNextTick", 23 "WaitingForNextTick",
24 "WaitingForTargetAvailability", 24 "WaitingForTargetAvailability",
25 "WaitingForStartTime", 25 "WaitingForStartTime",
26 "WaitingForDeletion", 26 "WaitingForDeletion",
27 "Running", 27 "Running",
28 "Paused", 28 "Paused",
29 "Finished", 29 "Finished",
30 "Aborted" 30 "Aborted"
31 }; 31 };
32 32
33 COMPILE_ASSERT(static_cast<int>(WebCore::CCActiveAnimation::RunStateEnumSize) == WTF_ARRAY_LENGTH(s_runStateNames), RunState_names_match_enum); 33 COMPILE_ASSERT(static_cast<int>(cc::CCActiveAnimation::RunStateEnumSize) == WTF_ ARRAY_LENGTH(s_runStateNames), RunState_names_match_enum);
34 34
35 // This should match the TargetProperty enum. 35 // This should match the TargetProperty enum.
36 static const char* const s_targetPropertyNames[] = { 36 static const char* const s_targetPropertyNames[] = {
37 "Transform", 37 "Transform",
38 "Opacity" 38 "Opacity"
39 }; 39 };
40 40
41 COMPILE_ASSERT(static_cast<int>(WebCore::CCActiveAnimation::TargetPropertyEnumSi ze) == WTF_ARRAY_LENGTH(s_targetPropertyNames), TargetProperty_names_match_enum) ; 41 COMPILE_ASSERT(static_cast<int>(cc::CCActiveAnimation::TargetPropertyEnumSize) = = WTF_ARRAY_LENGTH(s_targetPropertyNames), TargetProperty_names_match_enum);
42 42
43 } // namespace 43 } // namespace
44 44
45 namespace WebCore { 45 namespace cc {
46 46
47 PassOwnPtr<CCActiveAnimation> CCActiveAnimation::create(PassOwnPtr<CCAnimationCu rve> curve, int animationId, int groupId, TargetProperty targetProperty) 47 PassOwnPtr<CCActiveAnimation> CCActiveAnimation::create(PassOwnPtr<CCAnimationCu rve> curve, int animationId, int groupId, TargetProperty targetProperty)
48 { 48 {
49 return adoptPtr(new CCActiveAnimation(curve, animationId, groupId, targetPro perty)); 49 return adoptPtr(new CCActiveAnimation(curve, animationId, groupId, targetPro perty));
50 } 50 }
51 51
52 CCActiveAnimation::CCActiveAnimation(PassOwnPtr<CCAnimationCurve> curve, int ani mationId, int groupId, TargetProperty targetProperty) 52 CCActiveAnimation::CCActiveAnimation(PassOwnPtr<CCAnimationCurve> curve, int ani mationId, int groupId, TargetProperty targetProperty)
53 : m_curve(curve) 53 : m_curve(curve)
54 , m_id(animationId) 54 , m_id(animationId)
55 , m_group(groupId) 55 , m_group(groupId)
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void CCActiveAnimation::pushPropertiesTo(CCActiveAnimation* other) const 200 void CCActiveAnimation::pushPropertiesTo(CCActiveAnimation* other) const
201 { 201 {
202 // Currently, we only push changes due to pausing and resuming animations on the main thread. 202 // Currently, we only push changes due to pausing and resuming animations on the main thread.
203 if (m_runState == CCActiveAnimation::Paused || other->m_runState == CCActive Animation::Paused) { 203 if (m_runState == CCActiveAnimation::Paused || other->m_runState == CCActive Animation::Paused) {
204 other->m_runState = m_runState; 204 other->m_runState = m_runState;
205 other->m_pauseTime = m_pauseTime; 205 other->m_pauseTime = m_pauseTime;
206 other->m_totalPausedTime = m_totalPausedTime; 206 other->m_totalPausedTime = m_totalPausedTime;
207 } 207 }
208 } 208 }
209 209
210 } // namespace WebCore 210 } // namespace cc
OLDNEW
« no previous file with comments | « cc/CCActiveAnimation.h ('k') | cc/CCActiveAnimationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698