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

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 90090)
+++ content/browser/renderer_host/render_widget_host.cc (working copy)
@@ -96,12 +96,21 @@
}
RenderWidgetHost::~RenderWidgetHost() {
+ SetView(NULL);
+
// Clear our current or cached backing store if either remains.
BackingStoreManager::RemoveBackingStore(this);
process_->Release(routing_id_);
}
+void RenderWidgetHost::SetView(RenderWidgetHostView* view) {
+ view_ = view;
+
+ if (!view_)
+ process_->SetCompositingSurface(routing_id_, gfx::kNullPluginWindow);
+}
+
gfx::NativeViewId RenderWidgetHost::GetNativeViewId() {
if (view_)
return gfx::IdFromNativeView(view_->GetNativeView());
@@ -125,9 +134,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();
}
@@ -361,7 +372,7 @@
void RenderWidgetHost::ViewDestroyed() {
// TODO(evanm): tracking this may no longer be necessary;
// eliminate this function if so.
- view_ = NULL;
+ SetView(NULL);
}
void RenderWidgetHost::SetIsLoading(bool is_loading) {
« no previous file with comments | « content/browser/renderer_host/render_widget_host.h ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698