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

Unified Diff: content/common/webkitplatformsupport_impl.cc

Issue 10828088: aura: use TestWebGraphicsContext3D for the shared contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 8 years, 5 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
« no previous file with comments | « content/common/webkitplatformsupport_impl.h ('k') | ui/compositor/test_web_graphics_context_3d.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/webkitplatformsupport_impl.cc
diff --git a/content/common/webkitplatformsupport_impl.cc b/content/common/webkitplatformsupport_impl.cc
index dd7a9fcb7961f2e9fc64ecae629d1b88ff6e5390..991dc1e13d032c3f5f88a200659834b16506a55b 100644
--- a/content/common/webkitplatformsupport_impl.cc
+++ b/content/common/webkitplatformsupport_impl.cc
@@ -13,6 +13,10 @@
namespace content {
+namespace {
+WebKitPlatformSupportImpl::OffscreenContextFactory* g_context_factory = NULL;
+}
+
WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() {
}
@@ -55,6 +59,8 @@ WebKitPlatformSupportImpl::CreateWebSocketBridge(
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.
@@ -69,6 +75,12 @@ WebKitPlatformSupportImpl::createOffscreenGraphicsContext3D(
}
}
+// static
+void WebKitPlatformSupportImpl::SetOffscreenContextFactoryForTest(
+ OffscreenContextFactory factory) {
+ g_context_factory = factory;
+}
+
GpuChannelHostFactory* WebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
NOTREACHED();
return NULL;
« no previous file with comments | « content/common/webkitplatformsupport_impl.h ('k') | ui/compositor/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698