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

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

Issue 11434072: Send notification from GPU process to browser process of offscreen context creation and destruction… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed apatrick's review feedback. Renamed containing_document_url. 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 "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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const WebGraphicsContext3D::Attributes& attributes) { 61 const WebGraphicsContext3D::Attributes& attributes) {
62 if (g_context_factory) 62 if (g_context_factory)
63 return g_context_factory(); 63 return g_context_factory();
64 // The WebGraphicsContext3DInProcessImpl code path is used for 64 // The WebGraphicsContext3DInProcessImpl code path is used for
65 // layout tests (though not through this code) as well as for 65 // layout tests (though not through this code) as well as for
66 // debugging and bringing up new ports. 66 // debugging and bringing up new ports.
67 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { 67 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) {
68 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( 68 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
69 attributes, false); 69 attributes, false);
70 } else { 70 } else {
71 // Intentionally blank URL provided for offscreen contexts -- blank URLs are
72 // ignored in the GPU process for crash reporting.
73 return WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 71 return WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
74 GetGpuChannelHostFactory(), attributes, GURL()); 72 GetGpuChannelHostFactory(), attributes,
73 attributes.topDocumentURL);
75 } 74 }
76 } 75 }
77 76
78 // static 77 // static
79 void WebKitPlatformSupportImpl::SetOffscreenContextFactoryForTest( 78 void WebKitPlatformSupportImpl::SetOffscreenContextFactoryForTest(
80 OffscreenContextFactory factory) { 79 OffscreenContextFactory factory) {
81 g_context_factory = factory; 80 g_context_factory = factory;
82 } 81 }
83 82
84 GpuChannelHostFactory* WebKitPlatformSupportImpl::GetGpuChannelHostFactory() { 83 GpuChannelHostFactory* WebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
85 NOTREACHED(); 84 NOTREACHED();
86 return NULL; 85 return NULL;
87 } 86 }
88 87
89 } // namespace content 88 } // namespace content
OLDNEW
« content/browser/gpu/gpu_process_host.cc ('K') | « content/common/gpu/gpu_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698