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" |
11 #include "cc/output/output_surface.h" | 11 #include "cc/output/output_surface.h" |
12 #include "cc/output/software_output_device.h" | 12 #include "cc/output/software_output_device.h" |
13 #include "webkit/compositor_bindings/web_animation_impl.h" | 13 #include "webkit/compositor_bindings/web_animation_impl.h" |
14 #include "webkit/compositor_bindings/web_content_layer_impl.h" | 14 #include "webkit/compositor_bindings/web_content_layer_impl.h" |
15 #include "webkit/compositor_bindings/web_external_texture_layer_impl.h" | 15 #include "webkit/compositor_bindings/web_external_texture_layer_impl.h" |
16 #include "webkit/compositor_bindings/web_float_animation_curve_impl.h" | 16 #include "webkit/compositor_bindings/web_float_animation_curve_impl.h" |
17 #include "webkit/compositor_bindings/web_image_layer_impl.h" | 17 #include "webkit/compositor_bindings/web_image_layer_impl.h" |
18 #include "webkit/compositor_bindings/web_layer_impl.h" | 18 #include "webkit/compositor_bindings/web_layer_impl.h" |
19 #include "webkit/compositor_bindings/web_scrollbar_layer_impl.h" | 19 #include "webkit/compositor_bindings/web_scrollbar_layer_impl.h" |
20 #include "webkit/compositor_bindings/web_solid_color_layer_impl.h" | 20 #include "webkit/compositor_bindings/web_solid_color_layer_impl.h" |
21 #include "webkit/compositor_bindings/web_transform_animation_curve_impl.h" | 21 #include "webkit/compositor_bindings/web_transform_animation_curve_impl.h" |
22 #include "webkit/compositor_bindings/web_transform_operations_impl.h" | 22 #include "webkit/compositor_bindings/web_transform_operations_impl.h" |
23 #include "webkit/compositor_bindings/web_video_layer_impl.h" | |
24 #include "webkit/glue/webthread_impl.h" | 23 #include "webkit/glue/webthread_impl.h" |
25 #include "webkit/support/webkit_support.h" | 24 #include "webkit/support/webkit_support.h" |
26 | 25 |
27 using WebKit::WebAnimation; | 26 using WebKit::WebAnimation; |
28 using WebKit::WebAnimationCurve; | 27 using WebKit::WebAnimationCurve; |
29 using WebKit::WebContentLayer; | 28 using WebKit::WebContentLayer; |
30 using WebKit::WebContentLayerClient; | 29 using WebKit::WebContentLayerClient; |
31 using WebKit::WebExternalTextureLayer; | 30 using WebKit::WebExternalTextureLayer; |
32 using WebKit::WebExternalTextureLayerClient; | 31 using WebKit::WebExternalTextureLayerClient; |
33 using WebKit::WebFloatAnimationCurve; | 32 using WebKit::WebFloatAnimationCurve; |
34 using WebKit::WebImageLayer; | 33 using WebKit::WebImageLayer; |
35 using WebKit::WebLayer; | 34 using WebKit::WebLayer; |
36 using WebKit::WebScrollbar; | 35 using WebKit::WebScrollbar; |
37 using WebKit::WebScrollbarLayer; | 36 using WebKit::WebScrollbarLayer; |
38 using WebKit::WebScrollbarThemeGeometry; | 37 using WebKit::WebScrollbarThemeGeometry; |
39 using WebKit::WebScrollbarThemePainter; | 38 using WebKit::WebScrollbarThemePainter; |
40 using WebKit::WebSolidColorLayer; | 39 using WebKit::WebSolidColorLayer; |
41 using WebKit::WebTransformAnimationCurve; | 40 using WebKit::WebTransformAnimationCurve; |
42 using WebKit::WebTransformOperations; | 41 using WebKit::WebTransformOperations; |
43 using WebKit::WebVideoFrameProvider; | |
44 using WebKit::WebVideoLayer; | |
45 | 42 |
46 namespace webkit { | 43 namespace webkit { |
47 | 44 |
48 WebCompositorSupportImpl::WebCompositorSupportImpl() {} | 45 WebCompositorSupportImpl::WebCompositorSupportImpl() {} |
49 | 46 |
50 WebCompositorSupportImpl::~WebCompositorSupportImpl() {} | 47 WebCompositorSupportImpl::~WebCompositorSupportImpl() {} |
51 | 48 |
52 WebLayer* WebCompositorSupportImpl::createLayer() { | 49 WebLayer* WebCompositorSupportImpl::createLayer() { |
53 return new WebLayerImpl(); | 50 return new WebLayerImpl(); |
54 } | 51 } |
55 | 52 |
56 WebContentLayer* WebCompositorSupportImpl::createContentLayer( | 53 WebContentLayer* WebCompositorSupportImpl::createContentLayer( |
57 WebContentLayerClient* client) { | 54 WebContentLayerClient* client) { |
58 return new WebContentLayerImpl(client); | 55 return new WebContentLayerImpl(client); |
59 } | 56 } |
60 | 57 |
61 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( | 58 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( |
62 WebExternalTextureLayerClient* client) { | 59 WebExternalTextureLayerClient* client) { |
63 return new WebExternalTextureLayerImpl(client); | 60 return new WebExternalTextureLayerImpl(client); |
64 } | 61 } |
65 | 62 |
66 WebKit::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { | 63 WebKit::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { |
67 return new WebImageLayerImpl(); | 64 return new WebImageLayerImpl(); |
68 } | 65 } |
69 | 66 |
70 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { | 67 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { |
71 return new WebSolidColorLayerImpl(); | 68 return new WebSolidColorLayerImpl(); |
72 } | 69 } |
73 | 70 |
74 WebVideoLayer* WebCompositorSupportImpl::createVideoLayer( | |
75 WebKit::WebVideoFrameProvider* provider) { | |
76 return new WebVideoLayerImpl(provider); | |
77 } | |
78 | |
79 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( | 71 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( |
80 WebScrollbar* scrollbar, | 72 WebScrollbar* scrollbar, |
81 WebScrollbarThemePainter painter, | 73 WebScrollbarThemePainter painter, |
82 WebScrollbarThemeGeometry* geometry) { | 74 WebScrollbarThemeGeometry* geometry) { |
83 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); | 75 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); |
84 } | 76 } |
85 | 77 |
86 WebAnimation* WebCompositorSupportImpl::createAnimation( | 78 WebAnimation* WebCompositorSupportImpl::createAnimation( |
87 const WebKit::WebAnimationCurve& curve, | 79 const WebKit::WebAnimationCurve& curve, |
88 WebKit::WebAnimation::TargetProperty target, | 80 WebKit::WebAnimation::TargetProperty target, |
89 int animation_id) { | 81 int animation_id) { |
90 return new WebAnimationImpl(curve, target, animation_id, 0); | 82 return new WebAnimationImpl(curve, target, animation_id, 0); |
91 } | 83 } |
92 | 84 |
93 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { | 85 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { |
94 return new WebFloatAnimationCurveImpl(); | 86 return new WebFloatAnimationCurveImpl(); |
95 } | 87 } |
96 | 88 |
97 WebTransformAnimationCurve* | 89 WebTransformAnimationCurve* |
98 WebCompositorSupportImpl::createTransformAnimationCurve() { | 90 WebCompositorSupportImpl::createTransformAnimationCurve() { |
99 return new WebTransformAnimationCurveImpl(); | 91 return new WebTransformAnimationCurveImpl(); |
100 } | 92 } |
101 | 93 |
102 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { | 94 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { |
103 return new WebTransformOperationsImpl(); | 95 return new WebTransformOperationsImpl(); |
104 } | 96 } |
105 | 97 |
106 } // namespace webkit | 98 } // namespace webkit |
OLD | NEW |