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 "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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 WebKit::WebGraphicsContext3D* | 55 WebKit::WebGraphicsContext3D* |
56 WebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( | 56 WebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( |
57 const WebGraphicsContext3D::Attributes& attributes) { | 57 const WebGraphicsContext3D::Attributes& attributes) { |
58 // The WebGraphicsContext3DInProcessImpl code path is used for | 58 // The WebGraphicsContext3DInProcessImpl code path is used for |
59 // layout tests (though not through this code) as well as for | 59 // layout tests (though not through this code) as well as for |
60 // debugging and bringing up new ports. | 60 // debugging and bringing up new ports. |
61 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { | 61 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { |
62 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( | 62 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( |
63 attributes, false); | 63 attributes, false); |
64 } else { | 64 } else { |
| 65 // Intentionally blank URL provided for offscreen contexts -- blank URLs are |
| 66 // ignored in the GPU process for crash reporting. |
65 return WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( | 67 return WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( |
66 GetGpuChannelHostFactory(), attributes); | 68 GetGpuChannelHostFactory(), attributes, GURL()); |
67 } | 69 } |
68 } | 70 } |
69 | 71 |
70 GpuChannelHostFactory* WebKitPlatformSupportImpl::GetGpuChannelHostFactory() { | 72 GpuChannelHostFactory* WebKitPlatformSupportImpl::GetGpuChannelHostFactory() { |
71 NOTREACHED(); | 73 NOTREACHED(); |
72 return NULL; | 74 return NULL; |
73 } | 75 } |
74 | 76 |
75 } // namespace content | 77 } // namespace content |
OLD | NEW |