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

Unified Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 9667012: Fix --single-process mode issues with GpuChannelHostFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/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 cb074a5c7333774956eb59d2e799d4d5a8fe27c0..b8b79ed6c8c7397967077b62a41a393a0d09e929 100644
--- a/content/browser/renderer_host/image_transport_factory.cc
+++ b/content/browser/renderer_host/image_transport_factory.cc
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
+#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/renderer_host/image_transport_client.h"
#include "content/common/gpu/client/command_buffer_proxy.h"
#include "content/common/gpu/client/gpu_channel_host.h"
@@ -26,6 +27,8 @@
#include "ui/gfx/size.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
+using content::BrowserGpuChannelHostFactory;
+
namespace {
ImageTransportFactory* g_factory;
@@ -233,9 +236,10 @@ class GpuProcessTransportFactory : public ui::ContextFactory,
WebKit::WebGraphicsContext3D::Attributes attrs;
attrs.shareResources = true;
+ GpuChannelHostFactory* factory = BrowserGpuChannelHostFactory::instance();
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
new WebGraphicsContext3DCommandBufferImpl(
- data->surface_id, GURL(), data->swap_client->AsWeakPtr()));
+ data->surface_id, GURL(), factory, data->swap_client->AsWeakPtr()));
if (!context->Initialize(attrs))
return NULL;
return context.release();
@@ -362,10 +366,11 @@ class GpuProcessTransportFactory : public ui::ContextFactory,
data->swap_client.reset(new CompositorSwapClient(compositor, this));
+ GpuChannelHostFactory* factory = BrowserGpuChannelHostFactory::instance();
WebKit::WebGraphicsContext3D::Attributes attrs;
attrs.shareResources = true;
data->shared_context.reset(new WebGraphicsContext3DCommandBufferImpl(
- data->surface_id, GURL(), data->swap_client->AsWeakPtr()));
+ data->surface_id, GURL(), factory, data->swap_client->AsWeakPtr()));
if (!data->shared_context->Initialize(attrs)) {
// If we can't recreate contexts, we won't be able to show the UI. Better
// crash at this point.
« no previous file with comments | « content/browser/in_process_webkit/browser_webkitplatformsupport_impl.cc ('k') | content/common/gpu/client/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698