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

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

Issue 7136001: GPU compositing surface handle is no longer sent to renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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_widget_host.cc
===================================================================
--- content/browser/renderer_host/render_widget_host.cc (revision 89036)
+++ content/browser/renderer_host/render_widget_host.cc (working copy)
@@ -100,12 +100,21 @@
}
RenderWidgetHost::~RenderWidgetHost() {
+ set_view(NULL);
+
// Clear our current or cached backing store if either remains.
BackingStoreManager::RemoveBackingStore(this);
process_->Release(routing_id_);
}
+void RenderWidgetHost::set_view(RenderWidgetHostView* view) {
+ view_ = view;
+
+ if (!view_)
+ process_->SetCompositingSurface(routing_id_, gfx::kNullPluginWindow);
+}
+
gfx::NativeViewId RenderWidgetHost::GetNativeViewId() {
if (view_)
return gfx::IdFromNativeView(view_->GetNativeView());
@@ -129,9 +138,11 @@
renderer_initialized_ = true;
+ process_->SetCompositingSurface(routing_id_,
+ GetCompositingSurface());
+
// Send the ack along with the information on placement.
- Send(new ViewMsg_CreatingNew_ACK(
- routing_id_, GetNativeViewId(), GetCompositingSurface()));
+ Send(new ViewMsg_CreatingNew_ACK(routing_id_, GetNativeViewId()));
WasResized();
}
@@ -365,7 +376,7 @@
void RenderWidgetHost::ViewDestroyed() {
// TODO(evanm): tracking this may no longer be necessary;
// eliminate this function if so.
- view_ = NULL;
+ set_view(NULL);
}
void RenderWidgetHost::SetIsLoading(bool is_loading) {

Powered by Google App Engine
This is Rietveld 408576698