diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 17:46:23 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 17:46:23 +0000 |
commit | 77e74dbed3b57987515c260b651b72cec15825dc (patch) | |
tree | 66685b53d127093075f720f99fbb0869ab74c01d /chrome/common/gpu_messages.h | |
parent | 1ad13a2d0dd8d03b50e6fbadd6a26ea72712d2d9 (diff) | |
download | chromium_src-77e74dbed3b57987515c260b651b72cec15825dc.zip chromium_src-77e74dbed3b57987515c260b651b72cec15825dc.tar.gz chromium_src-77e74dbed3b57987515c260b651b72cec15825dc.tar.bz2 |
Initial port of accelerated compositor to Mac OS X 10.6. Reused
infrastructure added for Pepper 3D and Core Animation plugins to
render the compositor's output. The implementation allocates a fake
"plugin window handle" on the browser side which is the "root" handle,
containing the compositor's output, and which, if present, is drawn
before any other accelerated plugin instances.
Added messages from GPU process to browser process for handling window
resizing and presentation of output. Added support to GGL for "view"
contexts on Mac OS X, used only for the accelerated compositor, and
requiring explicit resize notifications.
The remainder of this port will go into the WebKit repository under
https://bugs.webkit.org/show_bug.cgi?id=43398 after this for
dependency reasons.
Tested manually with CSS 3D and WebGL demos. Several stability and
correctness issues remain and will be addressed in following CLs;
however, the current code works for the majority of basic use cases
including switching between accelerated compositing on and off, and
scrolling of content.
BUG=38969
TEST=none
Review URL: http://codereview.chromium.org/3067026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gpu_messages.h')
-rw-r--r-- | chrome/common/gpu_messages.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/chrome/common/gpu_messages.h b/chrome/common/gpu_messages.h index 508c599..1ff1741 100644 --- a/chrome/common/gpu_messages.h +++ b/chrome/common/gpu_messages.h @@ -18,7 +18,68 @@ #include "gfx/size.h" #include "gpu/command_buffer/common/command_buffer.h" +#if defined(OS_MACOSX) +// Parameters for the GpuHostMsg_AcceleratedSurfaceSetIOSurface +// message, which has too many parameters to be sent with the +// predefined IPC macros. +struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params { + int32 renderer_id; + int32 render_view_id; + gfx::PluginWindowHandle window; + int32 width; + int32 height; + uint64 identifier; + + GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params() + : renderer_id(0), + render_view_id(0), + window(NULL), + width(0), + height(0), + identifier(0) { + } +}; +#endif + namespace IPC { +#if defined(OS_MACOSX) +template <> +struct ParamTraits<GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params> { + typedef GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.renderer_id); + WriteParam(m, p.render_view_id); + WriteParam(m, p.window); + WriteParam(m, p.width); + WriteParam(m, p.height); + WriteParam(m, p.identifier); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->renderer_id) && + ReadParam(m, iter, &p->render_view_id) && + ReadParam(m, iter, &p->window) && + ReadParam(m, iter, &p->width) && + ReadParam(m, iter, &p->height) && + ReadParam(m, iter, &p->identifier); + } + static void Log(const param_type& p, std::wstring* l) { + l->append(L"("); + LogParam(p.renderer_id, l); + l->append(L", "); + LogParam(p.render_view_id, l); + l->append(L", "); + LogParam(p.window, l); + l->append(L", "); + LogParam(p.width, l); + l->append(L", "); + LogParam(p.height, l); + l->append(L", "); + LogParam(p.identifier, l); + l->append(L")"); + } +}; +#endif + template <> struct ParamTraits<GPUInfo> { typedef GPUInfo param_type; |