OLD | NEW |
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 "web_layer_impl.h" | 5 #include "web_layer_impl.h" |
6 | 6 |
7 #include "SkMatrix44.h" | 7 #include "SkMatrix44.h" |
8 #ifdef LOG | 8 #ifdef LOG |
9 #undef LOG | 9 #undef LOG |
10 #endif | 10 #endif |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "cc/active_animation.h" | 12 #include "cc/animation.h" |
13 #include "cc/layer.h" | 13 #include "cc/layer.h" |
14 #include "cc/region.h" | 14 #include "cc/region.h" |
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h" |
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h" | 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h" |
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
18 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa
trix.h" | 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa
trix.h" |
19 #include "web_animation_impl.h" | 19 #include "web_animation_impl.h" |
20 | 20 |
21 using cc::ActiveAnimation; | 21 using cc::Animation; |
22 using cc::Layer; | 22 using cc::Layer; |
23 | 23 |
24 namespace { | 24 namespace { |
25 gfx::Transform convertWebTransformationMatrixToTransform(const WebKit::WebTransf
ormationMatrix& matrix) | 25 gfx::Transform convertWebTransformationMatrixToTransform(const WebKit::WebTransf
ormationMatrix& matrix) |
26 { | 26 { |
27 // TODO(jamesr): When gfx::Transform provides a constructor that does not | 27 // TODO(jamesr): When gfx::Transform provides a constructor that does not |
28 // initialize the matrix, use that. | 28 // initialize the matrix, use that. |
29 gfx::Transform transform; | 29 gfx::Transform transform; |
30 transform.matrix().setDouble(0, 0, matrix.m11()); | 30 transform.matrix().setDouble(0, 0, matrix.m11()); |
31 transform.matrix().setDouble(0, 1, matrix.m21()); | 31 transform.matrix().setDouble(0, 1, matrix.m21()); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 return m_layer->addAnimation(static_cast<WebAnimationImpl*>(animation)->clon
eToAnimation()); | 282 return m_layer->addAnimation(static_cast<WebAnimationImpl*>(animation)->clon
eToAnimation()); |
283 } | 283 } |
284 | 284 |
285 void WebLayerImpl::removeAnimation(int animationId) | 285 void WebLayerImpl::removeAnimation(int animationId) |
286 { | 286 { |
287 m_layer->removeAnimation(animationId); | 287 m_layer->removeAnimation(animationId); |
288 } | 288 } |
289 | 289 |
290 void WebLayerImpl::removeAnimation(int animationId, WebAnimation::TargetProperty
targetProperty) | 290 void WebLayerImpl::removeAnimation(int animationId, WebAnimation::TargetProperty
targetProperty) |
291 { | 291 { |
292 m_layer->layerAnimationController()->removeAnimation(animationId, static_cas
t<ActiveAnimation::TargetProperty>(targetProperty)); | 292 m_layer->layerAnimationController()->removeAnimation(animationId, static_cas
t<Animation::TargetProperty>(targetProperty)); |
293 } | 293 } |
294 | 294 |
295 void WebLayerImpl::pauseAnimation(int animationId, double timeOffset) | 295 void WebLayerImpl::pauseAnimation(int animationId, double timeOffset) |
296 { | 296 { |
297 m_layer->pauseAnimation(animationId, timeOffset); | 297 m_layer->pauseAnimation(animationId, timeOffset); |
298 } | 298 } |
299 | 299 |
300 void WebLayerImpl::suspendAnimations(double monotonicTime) | 300 void WebLayerImpl::suspendAnimations(double monotonicTime) |
301 { | 301 { |
302 m_layer->suspendAnimations(monotonicTime); | 302 m_layer->suspendAnimations(monotonicTime); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 { | 444 { |
445 m_layer->setLayerScrollClient(scrollClient); | 445 m_layer->setLayerScrollClient(scrollClient); |
446 } | 446 } |
447 | 447 |
448 Layer* WebLayerImpl::layer() const | 448 Layer* WebLayerImpl::layer() const |
449 { | 449 { |
450 return m_layer.get(); | 450 return m_layer.get(); |
451 } | 451 } |
452 | 452 |
453 } // namespace WebKit | 453 } // namespace WebKit |
OLD | NEW |