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

Unified Diff: content/common/webkitplatformsupport_impl.cc

Issue 12212100: Provide shared context to Platform API in renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CreateOffscreenContext() Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/common/webkitplatformsupport_impl.cc
diff --git a/content/common/webkitplatformsupport_impl.cc b/content/common/webkitplatformsupport_impl.cc
index d3dcc34b5744431ec07cfa128de6bf7501d63e41..f80f7930b8140787a54578db75377e048ea39e3f 100644
--- a/content/common/webkitplatformsupport_impl.cc
+++ b/content/common/webkitplatformsupport_impl.cc
@@ -4,13 +4,10 @@
#include "base/command_line.h"
#include "content/common/child_thread.h"
-#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/socket_stream_dispatcher.h"
#include "content/common/webkitplatformsupport_impl.h"
#include "content/public/common/content_client.h"
-#include "content/public/common/content_switches.h"
#include "googleurl/src/gurl.h"
-#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
namespace content {
@@ -56,33 +53,16 @@ WebKitPlatformSupportImpl::CreateWebSocketBridge(
return dispatcher->CreateBridge(handle, delegate);
}
-WebKit::WebGraphicsContext3D*
-WebKitPlatformSupportImpl::createOffscreenGraphicsContext3D(
- const WebGraphicsContext3D::Attributes& attributes) {
- if (g_context_factory)
- return g_context_factory();
- // The WebGraphicsContext3DInProcessImpl code path is used for
- // layout tests (though not through this code) as well as for
- // debugging and bringing up new ports.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) {
- return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
- attributes, false);
- } else {
- return WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
- GetGpuChannelHostFactory(), attributes,
- GURL(attributes.topDocumentURL));
- }
-}
-
// static
void WebKitPlatformSupportImpl::SetOffscreenContextFactoryForTest(
OffscreenContextFactory factory) {
g_context_factory = factory;
}
-GpuChannelHostFactory* WebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
- NOTREACHED();
- return NULL;
+// static
+WebKitPlatformSupportImpl::OffscreenContextFactory* WebKitPlatformSupportImpl::
+ OffscreenContextFactoryForTest() {
+ return g_context_factory;
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698