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

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

Issue 1306053008: Avoid creating a RenderWidgetHostView for proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 19033a8ecdfa24d7156bc34187e4d0aa82ada488..a4bf9d18b5b150409218f24cc38a67e8a5cf9a3a 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -297,8 +297,18 @@ bool RenderViewHostImpl::CreateRenderView(
set_renderer_initialized(true);
- GpuSurfaceTracker::Get()->SetSurfaceHandle(
- surface_id(), GetCompositingSurface());
+ // If this is not an active RenderView, then we need to create a
+ // handle with NULL_TRANSPORT type. Active RenderViews will implement
+ // GetCompositingSurface() in the RenderWidgetHostView delegate which returns
+ // the appropriate surface type.
+ if (proxy_route_id != MSG_ROUTING_NONE) {
+ GpuSurfaceTracker::Get()->SetSurfaceHandle(
+ surface_id(),
+ gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NULL_TRANSPORT));
+ } else {
+ GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id(),
+ GetCompositingSurface());
+ }
// Ensure the RenderView starts with a next_page_id larger than any existing
// page ID it might be asked to render.
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698