From ab7f2746760f15e5fab7dae6e107da26002b7d82 Mon Sep 17 00:00:00 2001 From: "stuartmorgan@chromium.org" Date: Wed, 14 Apr 2010 17:24:51 +0000 Subject: 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 --- chrome/common/plugin_messages.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'chrome/common') 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 { 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 { 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 { 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); -- cgit v1.1