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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 11967013: Fixes issues when switching between software and compositing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 2b5e255ccb486c798869e044205a912e1d75a5b3..64b18820671c123d1df68c6e62678bb1f10d7e5c 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -808,9 +808,10 @@ void BrowserPlugin::EnableCompositing(bool enable) {
return;
if (enable && !compositing_helper_) {
- compositing_helper_.reset(new BrowserPluginCompositingHelper(
+ compositing_helper_ = new BrowserPluginCompositingHelper(
container_,
- render_view_routing_id_));
+ browser_plugin_manager(),
+ render_view_routing_id_);
}
compositing_helper_->EnableCompositing(enable);
@@ -821,7 +822,8 @@ void BrowserPlugin::destroy() {
// The BrowserPlugin's WebPluginContainer is deleted immediately after this
// call returns, so let's not keep a reference to it around.
container_ = NULL;
- compositing_helper_.reset();
+ if (compositing_helper_)
+ compositing_helper_->OnContainerDestroy();
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}

Powered by Google App Engine
This is Rietveld 408576698