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

Side by Side Diff: content/common/webkitplatformsupport_impl.cc

Issue 9667012: Fix --single-process mode issues with GpuChannelHostFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « content/common/webkitplatformsupport_impl.h ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "content/common/child_thread.h" 6 #include "content/common/child_thread.h"
7 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 7 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
8 #include "content/common/socket_stream_dispatcher.h" 8 #include "content/common/socket_stream_dispatcher.h"
9 #include "content/common/webkitplatformsupport_impl.h" 9 #include "content/common/webkitplatformsupport_impl.h"
10 #include "content/public/common/content_client.h" 10 #include "content/public/common/content_client.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 WebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( 54 WebKitPlatformSupportImpl::createOffscreenGraphicsContext3D(
55 const WebGraphicsContext3D::Attributes& attributes) { 55 const WebGraphicsContext3D::Attributes& attributes) {
56 // The WebGraphicsContext3DInProcessImpl code path is used for 56 // The WebGraphicsContext3DInProcessImpl code path is used for
57 // layout tests (though not through this code) as well as for 57 // layout tests (though not through this code) as well as for
58 // debugging and bringing up new ports. 58 // debugging and bringing up new ports.
59 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { 59 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) {
60 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( 60 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
61 attributes, false); 61 attributes, false);
62 } else { 62 } else {
63 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> null_client; 63 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> null_client;
64 GpuChannelHostFactory* factory = GetGpuChannelHostFactory();
65 if (!factory)
66 return NULL;
64 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( 67 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
65 new WebGraphicsContext3DCommandBufferImpl(0, GURL(), null_client)); 68 new WebGraphicsContext3DCommandBufferImpl(
69 0, GURL(), factory, null_client));
66 if (!context->Initialize(attributes)) 70 if (!context->Initialize(attributes))
67 return NULL; 71 return NULL;
68 return context.release(); 72 return context.release();
69 } 73 }
70 } 74 }
71 75
76 GpuChannelHostFactory* WebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
77 NOTREACHED();
78 return NULL;
79 }
80
72 } // namespace content 81 } // namespace content
OLDNEW
« no previous file with comments | « content/common/webkitplatformsupport_impl.h ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698