summaryrefslogtreecommitdiffstats
path: root/chrome/common/plugin_messages_internal.h
diff options
context:
space:
mode:
authordspringer@google.com <dspringer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-23 18:00:07 +0000
committerdspringer@google.com <dspringer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-23 18:00:07 +0000
commit1aef9813f6edaead72c9dfe24ccd07ec525c75b3 (patch)
tree9cd13cab509d4e9d32d63b043a0c8132b7033cce /chrome/common/plugin_messages_internal.h
parentbcc3a0cb7f900dda0b4065055f3539c01f901df2 (diff)
downloadchromium_src-1aef9813f6edaead72c9dfe24ccd07ec525c75b3.zip
chromium_src-1aef9813f6edaead72c9dfe24ccd07ec525c75b3.tar.gz
chromium_src-1aef9813f6edaead72c9dfe24ccd07ec525c75b3.tar.bz2
Add 3D support for the Mac on Leopard (OS X 10.5) and earlier. This CL uses
FBO rendering with glGetTexImage() into a TransportDIB that is then used as a texture for rendering the final image in the render view in the browser. While not optimal, it works and can be optimized later, after the new GPU process work is completed. This CL also enables stencil buffer support on the Mac. All the Pepper3D demos run on the Mac with these changes. BUG=none TEST=3D rendering unit tests. Review URL: http://codereview.chromium.org/647043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/plugin_messages_internal.h')
-rw-r--r--chrome/common/plugin_messages_internal.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index 66df30b..f83bfca 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -403,6 +403,17 @@ IPC_BEGIN_MESSAGES(PluginHost)
IPC_MESSAGE_ROUTED1(PluginHostMsg_UpdateGeometry_ACK,
int /* ack_key */)
+ // 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 GPU
+ // plug-in allocated a new TransportDIB that holds the GPU's rendered
+ // image. This information is then forwarded to the browser process via
+ // a similar message.
+ IPC_MESSAGE_ROUTED4(PluginHostMsg_GPUPluginSetTransportDIB,
+ gfx::PluginWindowHandle /* window */,
+ int32 /* width */,
+ int32 /* height */,
+ TransportDIB::Handle /* handle to the TransportDIB */)
+
// This message, used only on 10.6 and later, is sent from the
// plug-in process to the renderer process to indicate that the GPU
// plugin allocated a new IOSurface object of the given width and
@@ -418,11 +429,24 @@ IPC_BEGIN_MESSAGES(PluginHost)
int32 /* height */,
uint64 /* identifier for IOSurface */)
- // This message, currently used only on 10.6 and later, notifies the
- // renderer process (and from there the browser process) that the
- // GPU plugin swapped the buffers associated with the given
- // "window", which should cause the browser to redraw the various
- // GPU plugins' contents.
+
+ // On the Mac, shared memory can't be allocated in the sandbox, so
+ // the TransportDIB used by the GPU process for rendering has to be allocated
+ // and managed by the browser. This is a synchronous message, use with care.
+ IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_AllocTransportDIB,
+ size_t /* requested memory size */,
+ TransportDIB::Handle /* output: DIB handle */)
+
+ // Since the browser keeps handles to the allocated transport DIBs, this
+ // message is sent to tell the browser that it may release them when the
+ // renderer is finished with them.
+ IPC_MESSAGE_ROUTED1(PluginHostMsg_FreeTransportDIB,
+ TransportDIB::Id /* DIB id */)
+
+ // This message notifies the renderer process (and from there the
+ // browser process) that the GPU plugin swapped the buffers associated
+ // with the given "window", which should cause the browser to redraw
+ // the various GPU plugins' contents.
IPC_MESSAGE_ROUTED1(PluginHostMsg_GPUPluginBuffersSwapped,
gfx::PluginWindowHandle /* window */)
#endif