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

Side by Side Diff: content/renderer/compositor_bindings/web_animation_impl.cc

Issue 383503003: Remove #ifs related to WebScrollOffsetAnimationCurve (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/renderer/compositor_bindings/web_animation_impl.h" 5 #include "content/renderer/compositor_bindings/web_animation_impl.h"
6 6
7 #include "cc/animation/animation.h" 7 #include "cc/animation/animation.h"
8 #include "cc/animation/animation_curve.h" 8 #include "cc/animation/animation_curve.h"
9 #include "cc/animation/animation_id_provider.h" 9 #include "cc/animation/animation_id_provider.h"
10 #include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h " 10 #include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h "
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 static_cast<const WebTransformAnimationCurveImpl*>(&web_curve); 45 static_cast<const WebTransformAnimationCurveImpl*>(&web_curve);
46 curve = transform_curve_impl->CloneToAnimationCurve(); 46 curve = transform_curve_impl->CloneToAnimationCurve();
47 break; 47 break;
48 } 48 }
49 case WebAnimationCurve::AnimationCurveTypeFilter: { 49 case WebAnimationCurve::AnimationCurveTypeFilter: {
50 const WebFilterAnimationCurveImpl* filter_curve_impl = 50 const WebFilterAnimationCurveImpl* filter_curve_impl =
51 static_cast<const WebFilterAnimationCurveImpl*>(&web_curve); 51 static_cast<const WebFilterAnimationCurveImpl*>(&web_curve);
52 curve = filter_curve_impl->CloneToAnimationCurve(); 52 curve = filter_curve_impl->CloneToAnimationCurve();
53 break; 53 break;
54 } 54 }
55 #if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
56 case WebAnimationCurve::AnimationCurveTypeScrollOffset: { 55 case WebAnimationCurve::AnimationCurveTypeScrollOffset: {
57 const WebScrollOffsetAnimationCurveImpl* scroll_curve_impl = 56 const WebScrollOffsetAnimationCurveImpl* scroll_curve_impl =
58 static_cast<const WebScrollOffsetAnimationCurveImpl*>(&web_curve); 57 static_cast<const WebScrollOffsetAnimationCurveImpl*>(&web_curve);
59 curve = scroll_curve_impl->CloneToAnimationCurve(); 58 curve = scroll_curve_impl->CloneToAnimationCurve();
60 break; 59 break;
61 } 60 }
62 #endif
63 } 61 }
64 animation_ = Animation::Create( 62 animation_ = Animation::Create(
65 curve.Pass(), 63 curve.Pass(),
66 animation_id, 64 animation_id,
67 group_id, 65 group_id,
68 static_cast<cc::Animation::TargetProperty>(target_property)); 66 static_cast<cc::Animation::TargetProperty>(target_property));
69 } 67 }
70 68
71 WebAnimationImpl::~WebAnimationImpl() { 69 WebAnimationImpl::~WebAnimationImpl() {
72 } 70 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 149 }
152 #endif 150 #endif
153 151
154 scoped_ptr<cc::Animation> WebAnimationImpl::PassAnimation() { 152 scoped_ptr<cc::Animation> WebAnimationImpl::PassAnimation() {
155 animation_->set_needs_synchronized_start_time(true); 153 animation_->set_needs_synchronized_start_time(true);
156 return animation_.Pass(); 154 return animation_.Pass();
157 } 155 }
158 156
159 } // namespace content 157 } // namespace content
160 158
OLDNEW
« no previous file with comments | « content/child/assert_matching_enums.cc ('k') | content/renderer/compositor_bindings/web_compositor_support_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698