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/renderer/compositor_bindings/web_compositor_support_impl.h" | 5 #include "webkit/renderer/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/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "cc/animation/transform_operations.h" | 9 #include "cc/animation/transform_operations.h" |
10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
11 #include "cc/output/software_output_device.h" | 11 #include "cc/output/software_output_device.h" |
12 #include "webkit/child/webthread_impl.h" | 12 #include "webkit/child/webthread_impl.h" |
13 #include "webkit/renderer/compositor_bindings/web_animation_impl.h" | 13 #include "webkit/renderer/compositor_bindings/web_animation_impl.h" |
14 #include "webkit/renderer/compositor_bindings/web_content_layer_impl.h" | 14 #include "webkit/renderer/compositor_bindings/web_content_layer_impl.h" |
15 #include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" | 15 #include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" |
16 #include "webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h" | 16 #include "webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h" |
17 #include "webkit/renderer/compositor_bindings/web_filter_operations_impl.h" | 17 #include "webkit/renderer/compositor_bindings/web_filter_operations_impl.h" |
18 #include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" | 18 #include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" |
19 #include "webkit/renderer/compositor_bindings/web_image_layer_impl.h" | 19 #include "webkit/renderer/compositor_bindings/web_image_layer_impl.h" |
20 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" | 20 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" |
21 #include "webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h" | 21 #include "webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h" |
22 #include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h" | 22 #include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h" |
23 #include "webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h" | 23 #include "webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h" |
24 #include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl
.h" | 24 #include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl
.h" |
25 #include "webkit/renderer/compositor_bindings/web_transform_operations_impl.h" | 25 #include "webkit/renderer/compositor_bindings/web_transform_operations_impl.h" |
26 | 26 |
27 using WebKit::WebAnimation; | 27 using blink::WebAnimation; |
28 using WebKit::WebAnimationCurve; | 28 using blink::WebAnimationCurve; |
29 using WebKit::WebContentLayer; | 29 using blink::WebContentLayer; |
30 using WebKit::WebContentLayerClient; | 30 using blink::WebContentLayerClient; |
31 using WebKit::WebExternalTextureLayer; | 31 using blink::WebExternalTextureLayer; |
32 using WebKit::WebExternalTextureLayerClient; | 32 using blink::WebExternalTextureLayerClient; |
33 using WebKit::WebFilterAnimationCurve; | 33 using blink::WebFilterAnimationCurve; |
34 using WebKit::WebFilterOperations; | 34 using blink::WebFilterOperations; |
35 using WebKit::WebFloatAnimationCurve; | 35 using blink::WebFloatAnimationCurve; |
36 using WebKit::WebImageLayer; | 36 using blink::WebImageLayer; |
37 using WebKit::WebNinePatchLayer; | 37 using blink::WebNinePatchLayer; |
38 using WebKit::WebLayer; | 38 using blink::WebLayer; |
39 using WebKit::WebScrollbar; | 39 using blink::WebScrollbar; |
40 using WebKit::WebScrollbarLayer; | 40 using blink::WebScrollbarLayer; |
41 using WebKit::WebScrollbarThemeGeometry; | 41 using blink::WebScrollbarThemeGeometry; |
42 using WebKit::WebScrollbarThemePainter; | 42 using blink::WebScrollbarThemePainter; |
43 using WebKit::WebSolidColorLayer; | 43 using blink::WebSolidColorLayer; |
44 using WebKit::WebTransformAnimationCurve; | 44 using blink::WebTransformAnimationCurve; |
45 using WebKit::WebTransformOperations; | 45 using blink::WebTransformOperations; |
46 | 46 |
47 namespace webkit { | 47 namespace webkit { |
48 | 48 |
49 WebCompositorSupportImpl::WebCompositorSupportImpl() {} | 49 WebCompositorSupportImpl::WebCompositorSupportImpl() {} |
50 | 50 |
51 WebCompositorSupportImpl::~WebCompositorSupportImpl() {} | 51 WebCompositorSupportImpl::~WebCompositorSupportImpl() {} |
52 | 52 |
53 WebLayer* WebCompositorSupportImpl::createLayer() { | 53 WebLayer* WebCompositorSupportImpl::createLayer() { |
54 return new WebLayerImpl(); | 54 return new WebLayerImpl(); |
55 } | 55 } |
56 | 56 |
57 WebContentLayer* WebCompositorSupportImpl::createContentLayer( | 57 WebContentLayer* WebCompositorSupportImpl::createContentLayer( |
58 WebContentLayerClient* client) { | 58 WebContentLayerClient* client) { |
59 return new WebContentLayerImpl(client); | 59 return new WebContentLayerImpl(client); |
60 } | 60 } |
61 | 61 |
62 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( | 62 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( |
63 WebExternalTextureLayerClient* client) { | 63 WebExternalTextureLayerClient* client) { |
64 return new WebExternalTextureLayerImpl(client); | 64 return new WebExternalTextureLayerImpl(client); |
65 } | 65 } |
66 | 66 |
67 WebKit::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { | 67 blink::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { |
68 return new WebImageLayerImpl(); | 68 return new WebImageLayerImpl(); |
69 } | 69 } |
70 | 70 |
71 WebKit::WebNinePatchLayer* WebCompositorSupportImpl::createNinePatchLayer() { | 71 blink::WebNinePatchLayer* WebCompositorSupportImpl::createNinePatchLayer() { |
72 return new WebNinePatchLayerImpl(); | 72 return new WebNinePatchLayerImpl(); |
73 } | 73 } |
74 | 74 |
75 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { | 75 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { |
76 return new WebSolidColorLayerImpl(); | 76 return new WebSolidColorLayerImpl(); |
77 } | 77 } |
78 | 78 |
79 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( | 79 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( |
80 WebScrollbar* scrollbar, | 80 WebScrollbar* scrollbar, |
81 WebScrollbarThemePainter painter, | 81 WebScrollbarThemePainter painter, |
82 WebScrollbarThemeGeometry* geometry) { | 82 WebScrollbarThemeGeometry* geometry) { |
83 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); | 83 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); |
84 } | 84 } |
85 | 85 |
86 WebScrollbarLayer* WebCompositorSupportImpl::createSolidColorScrollbarLayer( | 86 WebScrollbarLayer* WebCompositorSupportImpl::createSolidColorScrollbarLayer( |
87 WebScrollbar::Orientation orientation, int thumb_thickness, | 87 WebScrollbar::Orientation orientation, int thumb_thickness, |
88 bool is_left_side_vertical_scrollbar) { | 88 bool is_left_side_vertical_scrollbar) { |
89 return new WebScrollbarLayerImpl(orientation, thumb_thickness, | 89 return new WebScrollbarLayerImpl(orientation, thumb_thickness, |
90 is_left_side_vertical_scrollbar); | 90 is_left_side_vertical_scrollbar); |
91 } | 91 } |
92 | 92 |
93 WebAnimation* WebCompositorSupportImpl::createAnimation( | 93 WebAnimation* WebCompositorSupportImpl::createAnimation( |
94 const WebKit::WebAnimationCurve& curve, | 94 const blink::WebAnimationCurve& curve, |
95 WebKit::WebAnimation::TargetProperty target, | 95 blink::WebAnimation::TargetProperty target, |
96 int animation_id) { | 96 int animation_id) { |
97 return new WebAnimationImpl(curve, target, animation_id, 0); | 97 return new WebAnimationImpl(curve, target, animation_id, 0); |
98 } | 98 } |
99 | 99 |
100 WebFilterAnimationCurve* | 100 WebFilterAnimationCurve* |
101 WebCompositorSupportImpl::createFilterAnimationCurve() { | 101 WebCompositorSupportImpl::createFilterAnimationCurve() { |
102 return new WebFilterAnimationCurveImpl(); | 102 return new WebFilterAnimationCurveImpl(); |
103 } | 103 } |
104 | 104 |
105 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { | 105 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { |
106 return new WebFloatAnimationCurveImpl(); | 106 return new WebFloatAnimationCurveImpl(); |
107 } | 107 } |
108 | 108 |
109 WebTransformAnimationCurve* | 109 WebTransformAnimationCurve* |
110 WebCompositorSupportImpl::createTransformAnimationCurve() { | 110 WebCompositorSupportImpl::createTransformAnimationCurve() { |
111 return new WebTransformAnimationCurveImpl(); | 111 return new WebTransformAnimationCurveImpl(); |
112 } | 112 } |
113 | 113 |
114 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { | 114 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { |
115 return new WebTransformOperationsImpl(); | 115 return new WebTransformOperationsImpl(); |
116 } | 116 } |
117 | 117 |
118 WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() { | 118 WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() { |
119 return new WebFilterOperationsImpl(); | 119 return new WebFilterOperationsImpl(); |
120 } | 120 } |
121 | 121 |
122 } // namespace webkit | 122 } // namespace webkit |
OLD | NEW |