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

Unified Diff: content/browser/renderer_host/image_transport_factory.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 | « no previous file | content/common/webkitplatformsupport_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/image_transport_factory.cc
diff --git a/content/browser/renderer_host/image_transport_factory.cc b/content/browser/renderer_host/image_transport_factory.cc
index d33b10b7c3a821377881f23686a8ddfa802afa78..08fbe6b28e76da4dbe211aacb47a9a3ac8aff40d 100644
--- a/content/browser/renderer_host/image_transport_factory.cc
+++ b/content/browser/renderer_host/image_transport_factory.cc
@@ -17,11 +17,13 @@
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
+#include "content/common/webkitplatformsupport_impl.h"
#include "content/public/common/content_switches.h"
#include "gpu/ipc/command_buffer_proxy.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_setup.h"
+#include "ui/compositor/test_web_graphics_context_3d.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
@@ -374,6 +376,13 @@ void CompositorSwapClient::OnLostContext() {
// Note: previous line destroyed this. Don't access members from now on.
}
+WebKit::WebGraphicsContext3D* CreateTestContext() {
+ ui::TestWebGraphicsContext3D* test_context =
+ new ui::TestWebGraphicsContext3D();
+ test_context->Initialize();
+ return test_context;
+}
+
} // anonymous namespace
// static
@@ -384,6 +393,8 @@ void ImageTransportFactory::Initialize() {
}
if (ui::IsTestCompositorEnabled()) {
g_factory = new DefaultTransportFactory();
+ content::WebKitPlatformSupportImpl::SetOffscreenContextFactoryForTest(
+ CreateTestContext);
} else {
#if defined(OS_WIN)
g_factory = new DefaultTransportFactory();
« no previous file with comments | « no previous file | content/common/webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698