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/output_surface.h" | 9 #include "cc/output_surface.h" |
10 #include "cc/software_output_device.h" | 10 #include "cc/software_output_device.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; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 81 } |
83 | 82 |
84 WebKit::WebCompositorOutputSurface* | 83 WebKit::WebCompositorOutputSurface* |
85 WebCompositorSupportImpl::createOutputSurfaceForSoftware() { | 84 WebCompositorSupportImpl::createOutputSurfaceForSoftware() { |
86 scoped_ptr<cc::SoftwareOutputDevice> software_device = | 85 scoped_ptr<cc::SoftwareOutputDevice> software_device = |
87 make_scoped_ptr(new cc::SoftwareOutputDevice); | 86 make_scoped_ptr(new cc::SoftwareOutputDevice); |
88 return new cc::OutputSurface(software_device.Pass()); | 87 return new cc::OutputSurface(software_device.Pass()); |
89 } | 88 } |
90 | 89 |
91 WebLayer* WebCompositorSupportImpl::createLayer() { | 90 WebLayer* WebCompositorSupportImpl::createLayer() { |
92 return new WebKit::WebLayerImpl(); | 91 return new WebLayerImpl(); |
93 } | 92 } |
94 | 93 |
95 WebContentLayer* WebCompositorSupportImpl::createContentLayer( | 94 WebContentLayer* WebCompositorSupportImpl::createContentLayer( |
96 WebContentLayerClient* client) { | 95 WebContentLayerClient* client) { |
97 return new WebKit::WebContentLayerImpl(client); | 96 return new WebContentLayerImpl(client); |
98 } | 97 } |
99 | 98 |
100 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( | 99 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( |
101 WebExternalTextureLayerClient* client) { | 100 WebExternalTextureLayerClient* client) { |
102 return new WebKit::WebExternalTextureLayerImpl(client); | 101 return new WebExternalTextureLayerImpl(client); |
103 } | 102 } |
104 | 103 |
105 WebKit::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { | 104 WebKit::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { |
106 return new WebKit::WebImageLayerImpl(); | 105 return new WebImageLayerImpl(); |
107 } | 106 } |
108 | 107 |
109 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { | 108 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() { |
110 return new WebKit::WebSolidColorLayerImpl(); | 109 return new WebSolidColorLayerImpl(); |
111 } | 110 } |
112 | 111 |
113 WebVideoLayer* WebCompositorSupportImpl::createVideoLayer( | 112 WebVideoLayer* WebCompositorSupportImpl::createVideoLayer( |
114 WebKit::WebVideoFrameProvider* provider) { | 113 WebKit::WebVideoFrameProvider* provider) { |
115 return new WebKit::WebVideoLayerImpl(provider); | 114 return new WebVideoLayerImpl(provider); |
116 } | 115 } |
117 | 116 |
118 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( | 117 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( |
119 WebScrollbar* scrollbar, | 118 WebScrollbar* scrollbar, |
120 WebScrollbarThemePainter painter, | 119 WebScrollbarThemePainter painter, |
121 WebScrollbarThemeGeometry* geometry) { | 120 WebScrollbarThemeGeometry* geometry) { |
122 return new WebKit::WebScrollbarLayerImpl(scrollbar, painter, geometry); | 121 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); |
123 } | 122 } |
124 | 123 |
125 WebAnimation* WebCompositorSupportImpl::createAnimation( | 124 WebAnimation* WebCompositorSupportImpl::createAnimation( |
126 const WebKit::WebAnimationCurve& curve, | 125 const WebKit::WebAnimationCurve& curve, |
127 WebKit::WebAnimation::TargetProperty target, | 126 WebKit::WebAnimation::TargetProperty target, |
128 int animation_id) { | 127 int animation_id) { |
129 return new WebKit::WebAnimationImpl(curve, target, animation_id); | 128 return new WebAnimationImpl(curve, target, animation_id, 0); |
130 } | 129 } |
131 | 130 |
132 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { | 131 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { |
133 return new WebKit::WebFloatAnimationCurveImpl(); | 132 return new WebFloatAnimationCurveImpl(); |
134 } | 133 } |
135 | 134 |
136 WebTransformAnimationCurve* | 135 WebTransformAnimationCurve* |
137 WebCompositorSupportImpl::createTransformAnimationCurve() { | 136 WebCompositorSupportImpl::createTransformAnimationCurve() { |
138 return new WebKit::WebTransformAnimationCurveImpl(); | 137 return new WebTransformAnimationCurveImpl(); |
139 } | 138 } |
140 | 139 |
141 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { | 140 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { |
142 return new WebTransformOperationsImpl(); | 141 return new WebTransformOperationsImpl(); |
143 } | 142 } |
144 | 143 |
145 } // namespace webkit | 144 } // namespace webkit |
OLD | NEW |