summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorstuartmorgan@google.com <stuartmorgan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-13 17:56:55 +0000
committerstuartmorgan@google.com <stuartmorgan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-13 17:56:55 +0000
commit278429b7cfff0119359708db1b684815ea832115 (patch)
tree20c2abe641c2bbed98e21ff9fdf85ac80e1b6151 /chrome/plugin
parent127017875991e4a1b3d12dfff23d70265f991ef6 (diff)
downloadchromium_src-278429b7cfff0119359708db1b684815ea832115.zip
chromium_src-278429b7cfff0119359708db1b684815ea832115.tar.gz
chromium_src-278429b7cfff0119359708db1b684815ea832115.tar.bz2
Add an UpdateContext call to WebPluginDelegateImpl on the Mac.
On the Mac, Flash appears to cache the CGContextRef provided in NPP_SetWindow until the next NPP_SetWindow call, so we need to call it sometime before the next plugin paint. This allows us to call NPP_SetWindow before telling the plugin to paint, but not from the Paint function itself (where it could have bad side-effects). BUG=18894,18980 TEST=Switch to HQ on a YouTube video; Flash should not crash. Review URL: http://codereview.chromium.org/165344 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/webplugin_proxy.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index 8a04650..7d2598a 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -29,6 +29,7 @@
#include "chrome/plugin/webplugin_delegate_stub.h"
#include "skia/ext/platform_device.h"
#include "webkit/api/public/WebBindings.h"
+#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/glue/webplugin_delegate.h"
#if defined(OS_WIN)
@@ -625,6 +626,9 @@ void WebPluginProxy::SetWindowlessBuffer(
delegate_->GetRect().height());
CGContextScaleCTM(background_context_, 1, -1);
}
+
+ static_cast<WebPluginDelegateImpl*>(delegate_)->UpdateContext(
+ windowless_context_);
}
#elif defined (OS_LINUX)
void WebPluginProxy::UpdateTransform() {