Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Side by Side Diff: webkit/compositor_bindings/web_compositor_support_impl.cc

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forlanding6 Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/thread_impl.h" 9 #include "cc/thread_impl.h"
10 #include "webkit/compositor_bindings/web_animation_impl.h" 10 #include "webkit/compositor_bindings/web_animation_impl.h"
11 #include "webkit/compositor_bindings/web_compositor_support_output_surface.h"
12 #include "webkit/compositor_bindings/web_compositor_support_software_output_devi ce.h"
11 #include "webkit/compositor_bindings/web_content_layer_impl.h" 13 #include "webkit/compositor_bindings/web_content_layer_impl.h"
12 #include "webkit/compositor_bindings/web_delegated_renderer_layer_impl.h" 14 #include "webkit/compositor_bindings/web_delegated_renderer_layer_impl.h"
13 #include "webkit/compositor_bindings/web_external_texture_layer_impl.h" 15 #include "webkit/compositor_bindings/web_external_texture_layer_impl.h"
14 #include "webkit/compositor_bindings/web_float_animation_curve_impl.h" 16 #include "webkit/compositor_bindings/web_float_animation_curve_impl.h"
15 #include "webkit/compositor_bindings/web_image_layer_impl.h" 17 #include "webkit/compositor_bindings/web_image_layer_impl.h"
16 #include "webkit/compositor_bindings/web_io_surface_layer_impl.h" 18 #include "webkit/compositor_bindings/web_io_surface_layer_impl.h"
17 #include "webkit/compositor_bindings/web_layer_impl.h" 19 #include "webkit/compositor_bindings/web_layer_impl.h"
18 #include "webkit/compositor_bindings/web_layer_tree_view_impl.h" 20 #include "webkit/compositor_bindings/web_layer_tree_view_impl.h"
19 #include "webkit/compositor_bindings/web_scrollbar_layer_impl.h" 21 #include "webkit/compositor_bindings/web_scrollbar_layer_impl.h"
20 #include "webkit/compositor_bindings/web_solid_color_layer_impl.h" 22 #include "webkit/compositor_bindings/web_solid_color_layer_impl.h"
21 #include "webkit/compositor_bindings/web_transform_animation_curve_impl.h" 23 #include "webkit/compositor_bindings/web_transform_animation_curve_impl.h"
22 #include "webkit/compositor_bindings/web_video_layer_impl.h" 24 #include "webkit/compositor_bindings/web_video_layer_impl.h"
23 #include "webkit/glue/webthread_impl.h" 25 #include "webkit/glue/webthread_impl.h"
26 #include "webkit/support/webkit_support.h"
24 27
25 using WebKit::WebAnimation; 28 using WebKit::WebAnimation;
26 using WebKit::WebAnimationCurve; 29 using WebKit::WebAnimationCurve;
27 using WebKit::WebContentLayer; 30 using WebKit::WebContentLayer;
28 using WebKit::WebContentLayerClient; 31 using WebKit::WebContentLayerClient;
29 using WebKit::WebDelegatedRendererLayer; 32 using WebKit::WebDelegatedRendererLayer;
30 using WebKit::WebExternalTextureLayer; 33 using WebKit::WebExternalTextureLayer;
31 using WebKit::WebExternalTextureLayerClient; 34 using WebKit::WebExternalTextureLayerClient;
32 using WebKit::WebFloatAnimationCurve; 35 using WebKit::WebFloatAnimationCurve;
33 using WebKit::WebIOSurfaceLayer; 36 using WebKit::WebIOSurfaceLayer;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 scoped_ptr<cc::Thread> impl_thread; 88 scoped_ptr<cc::Thread> impl_thread;
86 if (impl_thread_message_loop_proxy_) 89 if (impl_thread_message_loop_proxy_)
87 impl_thread = cc::ThreadImpl::createForDifferentThread( 90 impl_thread = cc::ThreadImpl::createForDifferentThread(
88 impl_thread_message_loop_proxy_); 91 impl_thread_message_loop_proxy_);
89 if (!layerTreeViewImpl->initialize(settings, impl_thread.Pass())) 92 if (!layerTreeViewImpl->initialize(settings, impl_thread.Pass()))
90 return NULL; 93 return NULL;
91 layerTreeViewImpl->setRootLayer(root); 94 layerTreeViewImpl->setRootLayer(root);
92 return layerTreeViewImpl.release(); 95 return layerTreeViewImpl.release();
93 } 96 }
94 97
98 WebKit::WebCompositorOutputSurface*
99 WebCompositorSupportImpl::createOutputSurfaceFor3D(
100 WebKit::WebGraphicsContext3D* context) {
101 scoped_ptr<WebKit::WebGraphicsContext3D> context3d = make_scoped_ptr(context);
102 return WebCompositorSupportOutputSurface::Create3d(
103 context3d.Pass()).release();
104 }
105
106 WebKit::WebCompositorOutputSurface*
107 WebCompositorSupportImpl::createOutputSurfaceForSoftware() {
108 scoped_ptr<WebCompositorSupportSoftwareOutputDevice> software_device =
109 make_scoped_ptr(new WebCompositorSupportSoftwareOutputDevice);
110 return WebCompositorSupportOutputSurface::CreateSoftware(
111 software_device.PassAs<cc::SoftwareOutputDevice>()).release();
112 }
113
95 WebLayer* WebCompositorSupportImpl::createLayer() { 114 WebLayer* WebCompositorSupportImpl::createLayer() {
96 return new WebKit::WebLayerImpl(); 115 return new WebKit::WebLayerImpl();
97 } 116 }
98 117
99 WebContentLayer* WebCompositorSupportImpl::createContentLayer( 118 WebContentLayer* WebCompositorSupportImpl::createContentLayer(
100 WebContentLayerClient* client) { 119 WebContentLayerClient* client) {
101 return new WebKit::WebContentLayerImpl(client); 120 return new WebKit::WebContentLayerImpl(client);
102 } 121 }
103 122
104 WebDelegatedRendererLayer* 123 WebDelegatedRendererLayer*
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { 165 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() {
147 return new WebKit::WebFloatAnimationCurveImpl(); 166 return new WebKit::WebFloatAnimationCurveImpl();
148 } 167 }
149 168
150 WebTransformAnimationCurve* 169 WebTransformAnimationCurve*
151 WebCompositorSupportImpl::createTransformAnimationCurve() { 170 WebCompositorSupportImpl::createTransformAnimationCurve() {
152 return new WebKit::WebTransformAnimationCurveImpl(); 171 return new WebKit::WebTransformAnimationCurveImpl();
153 } 172 }
154 173
155 } // namespace webkit 174 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698