summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authoralexst@chromium.org <alexst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-14 19:16:45 +0000
committeralexst@chromium.org <alexst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-14 19:16:45 +0000
commit69b791279a6108b4064b5d5b9faccd0f64a620d7 (patch)
treec30bb3fe5b04e3b95ccb6eb01c838cb2463143d7 /content
parent05b1313b1eb46c183c3f8cc4025d168db1953ac9 (diff)
downloadchromium_src-69b791279a6108b4064b5d5b9faccd0f64a620d7.zip
chromium_src-69b791279a6108b4064b5d5b9faccd0f64a620d7.tar.gz
chromium_src-69b791279a6108b4064b5d5b9faccd0f64a620d7.tar.bz2
Fix visibility in compositing.
When visibility of the browser plugin is toggled on and off, the image remained on screen in the compositing mode. This was introduced by the gutter layer used during resizing and autosize. The gutter layer is the compositing layer used for the browser plugin container. The content layer with the actual texture is the child of that gutter layer. When the container visibility is toggled, only the gutter layer was hidden. The solution is to plumb visibility changed to the compositing helper and hide the texture layer manually. BUG=175752 Review URL: https://chromiumcodereview.appspot.com/12258026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/renderer/browser_plugin/browser_plugin.cc3
-rw-r--r--content/renderer/browser_plugin/browser_plugin_compositing_helper.cc5
-rw-r--r--content/renderer/browser_plugin/browser_plugin_compositing_helper.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 99747c6..47de906 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -1102,6 +1102,9 @@ void BrowserPlugin::updateVisibility(bool visible) {
if (!navigate_src_sent_)
return;
+ if (compositing_helper_)
+ compositing_helper_->UpdateVisibility(visible);
+
browser_plugin_manager()->Send(new BrowserPluginHostMsg_SetVisibility(
render_view_routing_id_,
instance_id_,
diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
index 63fc12e..e056618 100644
--- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
+++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
@@ -210,4 +210,9 @@ void BrowserPluginCompositingHelper::OnBuffersSwapped(
last_mailbox_valid_ = current_mailbox_valid;
}
+void BrowserPluginCompositingHelper::UpdateVisibility(bool visible) {
+ if (texture_layer_)
+ texture_layer_->setIsDrawable(visible);
+}
+
} // namespace content
diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.h b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
index 9f739f4..a11956d 100644
--- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
+++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
@@ -39,6 +39,7 @@ class CONTENT_EXPORT BrowserPluginCompositingHelper :
const std::string& mailbox_name,
int gpu_route_id,
int gpu_host_id);
+ void UpdateVisibility(bool);
protected:
// Friend RefCounted so that the dtor can be non-public.
friend class base::RefCounted<BrowserPluginCompositingHelper>;