diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 00:38:11 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 00:38:11 +0000 |
commit | c20b454f6a44ff119c0683a8228b292ba88d6044 (patch) | |
tree | fa3e0721d2c084d14eb067cdc4b7c7a8bdc7ae17 /chrome/common | |
parent | 3deb65daf866945e0a5e211897e0d5382f3c272b (diff) | |
download | chromium_src-c20b454f6a44ff119c0683a8228b292ba88d6044.zip chromium_src-c20b454f6a44ff119c0683a8228b292ba88d6044.tar.gz chromium_src-c20b454f6a44ff119c0683a8228b292ba88d6044.tar.bz2 |
Fix painting problem with transparent plugins because plugins were ignoring the alpha channel sometimes.
This change introduces another buffer which holds the background image for transparent plugins. Before
painting these plugins, their backing store is overwritten with the background data.
This change also uses an ACK from the renderer to figure out when it can paint, similar to how the
renderer does it, which gives us throttling and also doesn't lead to painting when the tab is hidden.
Review URL: http://codereview.chromium.org/5040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/plugin_messages_internal.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h index 36cb1cd..146cd9c 100644 --- a/chrome/common/plugin_messages_internal.h +++ b/chrome/common/plugin_messages_internal.h @@ -102,6 +102,14 @@ IPC_BEGIN_MESSAGES(Plugin, 5) PluginMsg_Init_Params, bool /* result */) + // Used to synchronously request a paint for windowless plugins. + IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_Paint, + gfx::Rect /* damaged_rect */) + + // Sent by the renderer after it paints from its backing store so that the + // plugin knows it can send more invalidates. + IPC_MESSAGE_ROUTED0(PluginMsg_DidPaint) + IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_Print, PluginMsg_PrintResponse_Params /* params */) @@ -112,12 +120,16 @@ IPC_BEGIN_MESSAGES(Plugin, 5) IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_DidFinishLoadWithReason, int /* reason */) + // Updates the plugin location. For windowless plugins, windowless_buffer + // contains a buffer that the plugin draws into. background_buffer is used + // for transparent windowless plugins, and holds the background of the plugin + // rectangle. IPC_MESSAGE_ROUTED5(PluginMsg_UpdateGeometry, gfx::Rect /* window_rect */, gfx::Rect /* clip_rect */, bool /* visible */, SharedMemoryHandle /* windowless_buffer */, - SharedMemoryLock /* windowless_buffer_lock */) + SharedMemoryHandle /* background_buffer */) IPC_SYNC_MESSAGE_ROUTED0_0(PluginMsg_SetFocus) @@ -197,8 +209,6 @@ IPC_BEGIN_MESSAGES(PluginHost, 6) IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_CancelResource, int /* id */) - IPC_MESSAGE_ROUTED0(PluginHostMsg_Invalidate) - IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, gfx::Rect /* rect */) |