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