summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 04:42:21 +0000
committerkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 04:42:21 +0000
commitdc51d1ccc18135493f01464e38ed462825ae8e35 (patch)
tree2da87df4b40a6b8d413c7c94af91b1900952b9e0 /content/common
parent11a7c5374fc1a712ca52d012fffc26fc10dd3d93 (diff)
downloadchromium_src-dc51d1ccc18135493f01464e38ed462825ae8e35.zip
chromium_src-dc51d1ccc18135493f01464e38ed462825ae8e35.tar.gz
chromium_src-dc51d1ccc18135493f01464e38ed462825ae8e35.tar.bz2
Render Core Animation plugins through WebKit's compositor rather than
directly to the screen in the browser process. The new composited code path is now the default, though the old code path has been left in place under a command line flag while we gain confidence. Issue 105344 has been filed about removing the old code path. The new code path does not currently support 10.5. The consequence is that plugins using the InvalidatingCoreAnimation rendering model will not work on this version of Mac OS. Pepper 3D is not affected; it now uses a different rendering path. Changed the type of IOSurfaces' IDs from uint64 to uint32 in a few places throughout the code to match the IOSurfaceID typedef in the system header. This was necessary in order to simplify integration with Chrome's OpenGL code. There is a known problem in the new code path with garbage occasionally being drawn to the plugin's area during live resizing of Core Animation plugins. Issue 105346 has been filed to track this. It is unclear whether the additional complexity of the fix that is likely needed is worth it. Tested manually with the following content, with and without the --disable-composited-core-animation-plugins flag: - YouTube (does not trigger this code path) - Google+ Hangouts - http://unity3d.com/gallery/demos/live-demos (Unity 3D) - http://www.erain.com/labs/molehill/ (Stage 3D in Flash 11) - http://www.nissan-stagejuk3d.com/ (Stage 3D in Flash 11, live resizing; web site is flaky, sometimes fails to start) BUG=38967 TEST=manual testing with above test cases Review URL: http://codereview.chromium.org/8678037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112126 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/plugin_messages.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/content/common/plugin_messages.h b/content/common/plugin_messages.h
index d5f073c..8ede47c 100644
--- a/content/common/plugin_messages.h
+++ b/content/common/plugin_messages.h
@@ -382,6 +382,9 @@ IPC_MESSAGE_ROUTED1(PluginHostMsg_FocusChanged,
IPC_MESSAGE_ROUTED0(PluginHostMsg_StartIme)
+//----------------------------------------------------------------------
+// Legacy Core Animation plugin implementation rendering directly to screen.
+
// This message, used in Mac OS X 10.5 and earlier, is sent from the plug-in
// process to the renderer process to indicate that the plug-in allocated a
// new TransportDIB that holds the GPU's rendered image. This information is
@@ -435,6 +438,29 @@ IPC_MESSAGE_ROUTED1(PluginHostMsg_FreeTransportDIB,
IPC_MESSAGE_ROUTED2(PluginHostMsg_AcceleratedSurfaceBuffersSwapped,
gfx::PluginWindowHandle /* window */,
uint64 /* surface_id */)
+
+//----------------------------------------------------------------------
+// New Core Animation plugin implementation rendering via compositor.
+
+// Notifies the renderer process that this plugin will be using the
+// accelerated rendering path.
+IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginEnabledRendering)
+
+// Notifies the renderer process that the plugin allocated a new
+// IOSurface into which it is rendering. The renderer process forwards
+// this IOSurface to the GPU process, causing it to be bound to a
+// texture from which the compositor can render. Any previous
+// IOSurface allocated by this plugin must be implicitly released by
+// the receipt of this message.
+IPC_MESSAGE_ROUTED3(PluginHostMsg_AcceleratedPluginAllocatedIOSurface,
+ int32 /* width */,
+ int32 /* height */,
+ uint32 /* surface_id */)
+
+// Notifies the renderer process that the plugin produced a new frame
+// of content into its IOSurface, and therefore that the compositor
+// needs to redraw.
+IPC_MESSAGE_ROUTED0(PluginHostMsg_AcceleratedPluginSwappedIOSurface)
#endif
IPC_MESSAGE_CONTROL1(PluginHostMsg_ClearSiteDataResult,