| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "webkit/compositor_bindings/web_compositor_support_impl.h" | 5 #include "webkit/compositor_bindings/web_compositor_support_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
| 9 #include "cc/animation/transform_operations.h" | 9 #include "cc/animation/transform_operations.h" |
| 10 #include "cc/base/thread_impl.h" | 10 #include "cc/base/thread_impl.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "webkit/support/webkit_support.h" | 25 #include "webkit/support/webkit_support.h" |
| 26 | 26 |
| 27 using WebKit::WebAnimation; | 27 using WebKit::WebAnimation; |
| 28 using WebKit::WebAnimationCurve; | 28 using WebKit::WebAnimationCurve; |
| 29 using WebKit::WebContentLayer; | 29 using WebKit::WebContentLayer; |
| 30 using WebKit::WebContentLayerClient; | 30 using WebKit::WebContentLayerClient; |
| 31 using WebKit::WebExternalTextureLayer; | 31 using WebKit::WebExternalTextureLayer; |
| 32 using WebKit::WebExternalTextureLayerClient; | 32 using WebKit::WebExternalTextureLayerClient; |
| 33 using WebKit::WebFloatAnimationCurve; | 33 using WebKit::WebFloatAnimationCurve; |
| 34 using WebKit::WebImageLayer; | 34 using WebKit::WebImageLayer; |
| 35 using WebKit::WebImageLayer; | |
| 36 using WebKit::WebLayer; | 35 using WebKit::WebLayer; |
| 37 using WebKit::WebScrollbar; | 36 using WebKit::WebScrollbar; |
| 38 using WebKit::WebScrollbarLayer; | 37 using WebKit::WebScrollbarLayer; |
| 39 using WebKit::WebScrollbarThemeGeometry; | 38 using WebKit::WebScrollbarThemeGeometry; |
| 40 using WebKit::WebScrollbarThemePainter; | 39 using WebKit::WebScrollbarThemePainter; |
| 41 using WebKit::WebSolidColorLayer; | 40 using WebKit::WebSolidColorLayer; |
| 42 using WebKit::WebTransformAnimationCurve; | 41 using WebKit::WebTransformAnimationCurve; |
| 43 using WebKit::WebTransformOperations; | 42 using WebKit::WebTransformOperations; |
| 44 using WebKit::WebVideoFrameProvider; | 43 using WebKit::WebVideoFrameProvider; |
| 45 using WebKit::WebVideoLayer; | 44 using WebKit::WebVideoLayer; |
| 46 | 45 |
| 47 namespace webkit { | 46 namespace webkit { |
| 48 | 47 |
| 49 WebCompositorSupportImpl::WebCompositorSupportImpl() {} | 48 WebCompositorSupportImpl::WebCompositorSupportImpl() {} |
| 50 | 49 |
| 51 WebCompositorSupportImpl::~WebCompositorSupportImpl() {} | 50 WebCompositorSupportImpl::~WebCompositorSupportImpl() {} |
| 52 | 51 |
| 53 WebLayer* WebCompositorSupportImpl::createLayer() { | 52 WebLayer* WebCompositorSupportImpl::createLayer() { |
| 54 return new WebKit::WebLayerImpl(); | 53 return new WebLayerImpl(); |
| 55 } | 54 } |
| 56 | 55 |
| 57 WebContentLayer* WebCompositorSupportImpl::createContentLayer( | 56 WebContentLayer* WebCompositorSupportImpl::createContentLayer( |
| 58 WebContentLayerClient* client) { | 57 WebContentLayerClient* client) { |
| 59 return new WebKit::WebContentLayerImpl(client); | 58 return new WebContentLayerImpl(client); |
| 60 } | 59 } |
| 61 | 60 |
| 62 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( | 61 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( |
| 63 WebExternalTextureLayerClient* client) { | 62 WebExternalTextureLayerClient* client) { |
| 64 return new WebKit::WebExternalTextureLayerImpl(client); | 63 return new WebExternalTextureLayerImpl(client); |
| 65 } | 64 } |
| 66 | 65 |
| 67 WebKit::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { | 66 WebKit::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { |
| 68 return new WebKit::WebImageLayerImpl(); | 67 return new WebImageLayerImpl(); |
| 69 } | 68 } |
| 70 | 69 |
| 71 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { | 70 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { |
| 72 return new WebKit::WebSolidColorLayerImpl(); | 71 return new WebSolidColorLayerImpl(); |
| 73 } | 72 } |
| 74 | 73 |
| 75 WebVideoLayer* WebCompositorSupportImpl::createVideoLayer( | 74 WebVideoLayer* WebCompositorSupportImpl::createVideoLayer( |
| 76 WebKit::WebVideoFrameProvider* provider) { | 75 WebKit::WebVideoFrameProvider* provider) { |
| 77 return new WebKit::WebVideoLayerImpl(provider); | 76 return new WebVideoLayerImpl(provider); |
| 78 } | 77 } |
| 79 | 78 |
| 80 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( | 79 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( |
| 81 WebScrollbar* scrollbar, | 80 WebScrollbar* scrollbar, |
| 82 WebScrollbarThemePainter painter, | 81 WebScrollbarThemePainter painter, |
| 83 WebScrollbarThemeGeometry* geometry) { | 82 WebScrollbarThemeGeometry* geometry) { |
| 84 return new WebKit::WebScrollbarLayerImpl(scrollbar, painter, geometry); | 83 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); |
| 85 } | 84 } |
| 86 | 85 |
| 87 WebAnimation* WebCompositorSupportImpl::createAnimation( | 86 WebAnimation* WebCompositorSupportImpl::createAnimation( |
| 88 const WebKit::WebAnimationCurve& curve, | 87 const WebKit::WebAnimationCurve& curve, |
| 89 WebKit::WebAnimation::TargetProperty target, | 88 WebKit::WebAnimation::TargetProperty target, |
| 90 int animation_id) { | 89 int animation_id) { |
| 91 return new WebKit::WebAnimationImpl(curve, target, animation_id); | 90 return new WebAnimationImpl(curve, target, animation_id, 0); |
| 92 } | 91 } |
| 93 | 92 |
| 94 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { | 93 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { |
| 95 return new WebKit::WebFloatAnimationCurveImpl(); | 94 return new WebFloatAnimationCurveImpl(); |
| 96 } | 95 } |
| 97 | 96 |
| 98 WebTransformAnimationCurve* | 97 WebTransformAnimationCurve* |
| 99 WebCompositorSupportImpl::createTransformAnimationCurve() { | 98 WebCompositorSupportImpl::createTransformAnimationCurve() { |
| 100 return new WebKit::WebTransformAnimationCurveImpl(); | 99 return new WebTransformAnimationCurveImpl(); |
| 101 } | 100 } |
| 102 | 101 |
| 103 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { | 102 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { |
| 104 return new WebTransformOperationsImpl(); | 103 return new WebTransformOperationsImpl(); |
| 105 } | 104 } |
| 106 | 105 |
| 107 } // namespace webkit | 106 } // namespace webkit |
| OLD | NEW |