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

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

Issue 11967033: [CLOSED] In-browser software compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the lack SkCanvas::clear scissoring. Created 7 years, 11 months 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/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
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
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
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/compositor_bindings.gyp ('k') | webkit/compositor_bindings/web_compositor_support_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698