diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-15 00:58:03 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-15 00:58:03 +0000 |
commit | ea04a4e187e030cbc340710285e574f66cc563ac (patch) | |
tree | 1331efa8aed5b5cfdbf384c6a5bee6d3885b10b2 /chrome/renderer | |
parent | 47e119f0e2aa67b9129fee70cad09e32cb8bd7de (diff) | |
download | chromium_src-ea04a4e187e030cbc340710285e574f66cc563ac.zip chromium_src-ea04a4e187e030cbc340710285e574f66cc563ac.tar.gz chromium_src-ea04a4e187e030cbc340710285e574f66cc563ac.tar.bz2 |
Made Pepper 3D plugins' output opaque on Mac OS X by filling the
plugin region's alpha channel with 1.0 and then overwriting just the
color channels. Core Animation plugins, though they currently always
overlay HTML output, remain translucent.
BUG=41424
TEST=ran Pepper 3D sample and verified its background is opaque
Review URL: http://codereview.chromium.org/1547034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_view.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 2 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 10 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.h | 4 |
4 files changed, 11 insertions, 10 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index a733079..bf866ce 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -4851,10 +4851,11 @@ void RenderView::EnsureDocumentTag() { } #if defined(OS_MACOSX) -gfx::PluginWindowHandle RenderView::AllocateFakePluginWindowHandle() { +gfx::PluginWindowHandle RenderView::AllocateFakePluginWindowHandle( + bool opaque) { gfx::PluginWindowHandle window = NULL; Send(new ViewHostMsg_AllocateFakePluginWindowHandle( - routing_id(), &window)); + routing_id(), opaque, &window)); return window; } diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 14bf4bb..7277752 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -490,7 +490,7 @@ class RenderView : public RenderWidget, #if defined(OS_MACOSX) // Helper routines for GPU plugin support. Used by the // WebPluginDelegateProxy, which has a pointer to the RenderView. - gfx::PluginWindowHandle AllocateFakePluginWindowHandle(); + gfx::PluginWindowHandle AllocateFakePluginWindowHandle(bool opaque); void DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window); void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window, int32 width, diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 59843ad..ef2f3f9 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -1336,8 +1336,8 @@ WebPluginDelegateProxy::CreateSeekableResourceClient( } #if defined(OS_MACOSX) -void WebPluginDelegateProxy::OnBindFakePluginWindowHandle() { - BindFakePluginWindowHandle(); +void WebPluginDelegateProxy::OnBindFakePluginWindowHandle(bool opaque) { + BindFakePluginWindowHandle(opaque); } // Synthesize a fake window handle for the plug-in to identify the instance @@ -1345,10 +1345,10 @@ void WebPluginDelegateProxy::OnBindFakePluginWindowHandle() { // of plug-in content. The browser generates the handle which is then set on // the plug-in. Returns true if it successfully sets the window handle on the // plug-in. -bool WebPluginDelegateProxy::BindFakePluginWindowHandle() { +bool WebPluginDelegateProxy::BindFakePluginWindowHandle(bool opaque) { gfx::PluginWindowHandle fake_window = NULL; if (render_view_) - fake_window = render_view_->AllocateFakePluginWindowHandle(); + fake_window = render_view_->AllocateFakePluginWindowHandle(opaque); // If we aren't running on 10.6, this allocation will fail. if (!fake_window) return false; @@ -1382,7 +1382,7 @@ bool WebPluginDelegateProxy::BindFakePluginWindowHandle() { CommandBufferProxy* WebPluginDelegateProxy::CreateCommandBuffer() { #if defined(ENABLE_GPU) #if defined(OS_MACOSX) - if (!BindFakePluginWindowHandle()) + if (!BindFakePluginWindowHandle(true)) return NULL; #endif int command_buffer_id; diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h index b7b73b8..ae5b4f1 100644 --- a/chrome/renderer/webplugin_delegate_proxy.h +++ b/chrome/renderer/webplugin_delegate_proxy.h @@ -149,7 +149,7 @@ class WebPluginDelegateProxy void OnDeferResourceLoading(unsigned long resource_id, bool defer); #if defined(OS_MACOSX) - void OnBindFakePluginWindowHandle(); + void OnBindFakePluginWindowHandle(bool opaque); void OnUpdateGeometry_ACK(int ack_key); void OnAcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window, int32 width, @@ -194,7 +194,7 @@ class WebPluginDelegateProxy // of plug-in content. The browser generates the handle which is then set on // the plug-in. Returns true if it successfully sets the window handle on the // plug-in. - bool BindFakePluginWindowHandle(); + bool BindFakePluginWindowHandle(bool opaque); // The Mac TransportDIB implementation uses base::SharedMemory, which // cannot be disposed of if an in-flight UpdateGeometry message refers to |