summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
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>;