summaryrefslogtreecommitdiffstats
path: root/chrome/common/plugin_messages.h
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 17:24:51 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 17:24:51 +0000
commitab7f2746760f15e5fab7dae6e107da26002b7d82 (patch)
tree1fce04333f2dfab22d587e471bbf84c62e6c8251 /chrome/common/plugin_messages.h
parent64e10897fd89b86a2085ad0d47f374419ff4a9db (diff)
downloadchromium_src-ab7f2746760f15e5fab7dae6e107da26002b7d82.zip
chromium_src-ab7f2746760f15e5fab7dae6e107da26002b7d82.tar.gz
chromium_src-ab7f2746760f15e5fab7dae6e107da26002b7d82.tar.bz2
Improve plugin performance on the Mac
This makes a few changes: - Switch to memcpy instead of CG drawing to copy pixels from the transport bitmap to the backing bitmap (this is a substantial perf win). - Send transparancy information to the WebPluginDelegate, since it's no longer equivalent to not having a background DIB on the Mac (and likely on the other platforms in the future). - Don't clear the transport DIB for non-transparent plugins, since they will be drawing over whatever is there anyway. BUG=41340 TEST=Both transparent and non-transparent plugins should continue to draw correctly. Framerates for large CG plugins (e.g., in-window Netflix streaming) should be higher. Review URL: http://codereview.chromium.org/1629017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/plugin_messages.h')
-rw-r--r--chrome/common/plugin_messages.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h
index bfee6c3..82116d8 100644
--- a/chrome/common/plugin_messages.h
+++ b/chrome/common/plugin_messages.h
@@ -98,6 +98,7 @@ struct PluginMsg_UpdateGeometry_Param {
gfx::Rect clip_rect;
TransportDIB::Handle windowless_buffer;
TransportDIB::Handle background_buffer;
+ bool transparent;
#if defined(OS_MACOSX)
// This field contains a key that the plug-in process is expected to return
@@ -386,6 +387,7 @@ struct ParamTraits<PluginMsg_UpdateGeometry_Param> {
WriteParam(m, p.clip_rect);
WriteParam(m, p.windowless_buffer);
WriteParam(m, p.background_buffer);
+ WriteParam(m, p.transparent);
#if defined(OS_MACOSX)
WriteParam(m, p.ack_key);
#endif
@@ -395,7 +397,8 @@ struct ParamTraits<PluginMsg_UpdateGeometry_Param> {
ReadParam(m, iter, &r->window_rect) &&
ReadParam(m, iter, &r->clip_rect) &&
ReadParam(m, iter, &r->windowless_buffer) &&
- ReadParam(m, iter, &r->background_buffer)
+ ReadParam(m, iter, &r->background_buffer) &&
+ ReadParam(m, iter, &r->transparent)
#if defined(OS_MACOSX)
&&
ReadParam(m, iter, &r->ack_key)
@@ -411,6 +414,8 @@ struct ParamTraits<PluginMsg_UpdateGeometry_Param> {
LogParam(p.windowless_buffer, l);
l->append(L", ");
LogParam(p.background_buffer, l);
+ l->append(L", ");
+ LogParam(p.transparent, l);
#if defined(OS_MACOSX)
l->append(L", ");
LogParam(p.ack_key, l);