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_impl.h" |
| 10 #include "cc/software_output_device_impl.h" |
9 #include "cc/thread_impl.h" | 11 #include "cc/thread_impl.h" |
10 #include "cc/transform_operations.h" | 12 #include "cc/transform_operations.h" |
11 #include "webkit/compositor_bindings/web_animation_impl.h" | 13 #include "webkit/compositor_bindings/web_animation_impl.h" |
12 #include "webkit/compositor_bindings/web_compositor_support_output_surface.h" | |
13 #include "webkit/compositor_bindings/web_compositor_support_software_output_devi
ce.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_io_surface_layer_impl.h" | 18 #include "webkit/compositor_bindings/web_io_surface_layer_impl.h" |
19 #include "webkit/compositor_bindings/web_layer_impl.h" | 19 #include "webkit/compositor_bindings/web_layer_impl.h" |
20 #include "webkit/compositor_bindings/web_layer_tree_view_impl.h" | 20 #include "webkit/compositor_bindings/web_layer_tree_view_impl.h" |
21 #include "webkit/compositor_bindings/web_scrollbar_layer_impl.h" | 21 #include "webkit/compositor_bindings/web_scrollbar_layer_impl.h" |
22 #include "webkit/compositor_bindings/web_solid_color_layer_impl.h" | 22 #include "webkit/compositor_bindings/web_solid_color_layer_impl.h" |
23 #include "webkit/compositor_bindings/web_transform_animation_curve_impl.h" | 23 #include "webkit/compositor_bindings/web_transform_animation_curve_impl.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 if (!layerTreeViewImpl->initialize(settings, impl_thread.Pass())) | 93 if (!layerTreeViewImpl->initialize(settings, impl_thread.Pass())) |
94 return NULL; | 94 return NULL; |
95 layerTreeViewImpl->setRootLayer(root); | 95 layerTreeViewImpl->setRootLayer(root); |
96 return layerTreeViewImpl.release(); | 96 return layerTreeViewImpl.release(); |
97 } | 97 } |
98 | 98 |
99 WebKit::WebCompositorOutputSurface* | 99 WebKit::WebCompositorOutputSurface* |
100 WebCompositorSupportImpl::createOutputSurfaceFor3D( | 100 WebCompositorSupportImpl::createOutputSurfaceFor3D( |
101 WebKit::WebGraphicsContext3D* context) { | 101 WebKit::WebGraphicsContext3D* context) { |
102 scoped_ptr<WebKit::WebGraphicsContext3D> context3d = make_scoped_ptr(context); | 102 scoped_ptr<WebKit::WebGraphicsContext3D> context3d = make_scoped_ptr(context); |
103 return WebCompositorSupportOutputSurface::Create3d( | 103 return new cc::OutputSurfaceImpl(context3d.Pass()); |
104 context3d.Pass()).release(); | |
105 } | 104 } |
106 | 105 |
107 WebKit::WebCompositorOutputSurface* | 106 WebKit::WebCompositorOutputSurface* |
108 WebCompositorSupportImpl::createOutputSurfaceForSoftware() { | 107 WebCompositorSupportImpl::createOutputSurfaceForSoftware() { |
109 scoped_ptr<WebCompositorSupportSoftwareOutputDevice> software_device = | 108 scoped_ptr<cc::SoftwareOutputDeviceImpl> software_device = |
110 make_scoped_ptr(new WebCompositorSupportSoftwareOutputDevice); | 109 make_scoped_ptr(new cc::SoftwareOutputDeviceImpl); |
111 return WebCompositorSupportOutputSurface::CreateSoftware( | 110 return new cc::OutputSurfaceImpl( |
112 software_device.PassAs<cc::SoftwareOutputDevice>()).release(); | 111 software_device.PassAs<cc::SoftwareOutputDevice>()); |
113 } | 112 } |
114 | 113 |
115 WebLayer* WebCompositorSupportImpl::createLayer() { | 114 WebLayer* WebCompositorSupportImpl::createLayer() { |
116 return new WebKit::WebLayerImpl(); | 115 return new WebKit::WebLayerImpl(); |
117 } | 116 } |
118 | 117 |
119 WebContentLayer* WebCompositorSupportImpl::createContentLayer( | 118 WebContentLayer* WebCompositorSupportImpl::createContentLayer( |
120 WebContentLayerClient* client) { | 119 WebContentLayerClient* client) { |
121 return new WebKit::WebContentLayerImpl(client); | 120 return new WebKit::WebContentLayerImpl(client); |
122 } | 121 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 WebTransformAnimationCurve* | 164 WebTransformAnimationCurve* |
166 WebCompositorSupportImpl::createTransformAnimationCurve() { | 165 WebCompositorSupportImpl::createTransformAnimationCurve() { |
167 return new WebKit::WebTransformAnimationCurveImpl(); | 166 return new WebKit::WebTransformAnimationCurveImpl(); |
168 } | 167 } |
169 | 168 |
170 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { | 169 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { |
171 return new WebTransformOperationsImpl(); | 170 return new WebTransformOperationsImpl(); |
172 } | 171 } |
173 | 172 |
174 } // namespace webkit | 173 } // namespace webkit |
OLD | NEW |