diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-25 17:01:55 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-25 17:01:55 +0000 |
commit | ae80234930dff518134b0073fe7c3d3fdcdcd4ec (patch) | |
tree | 5b267918fac3d3b414ab5a6d1a62f137e45bf4cc /content/browser/gpu | |
parent | 1cf99aa4097c941fbd3295eee277b40a947978df (diff) | |
download | chromium_src-ae80234930dff518134b0073fe7c3d3fdcdcd4ec.zip chromium_src-ae80234930dff518134b0073fe7c3d3fdcdcd4ec.tar.gz chromium_src-ae80234930dff518134b0073fe7c3d3fdcdcd4ec.tar.bz2 |
Reland "EGLImage transport for TOUCH_UI".
The issue with r90511 was that we need EGL header files for touchui=1 builds. The solution was to pull them in from third_party/angle for touchui=1 only.
BUG=none
TEST=by hand on Linux (w/ and w/o TOUCH_UI), Windows, and Mac
TBR=sky@chromium.org,apatrick@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90513 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/gpu')
-rw-r--r-- | content/browser/gpu/gpu_process_host_ui_shim.cc | 45 | ||||
-rw-r--r-- | content/browser/gpu/gpu_process_host_ui_shim.h | 10 |
2 files changed, 52 insertions, 3 deletions
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc index 0abee9f..2bd04f1 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.cc +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc @@ -149,12 +149,19 @@ bool GpuProcessHostUIShim::OnControlMessageReceived( OnLogMessage) #if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) || defined(OS_WIN) IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) -#elif defined(OS_MACOSX) +#endif + +#if defined(OS_MACOSX) || defined(TOUCH_UI) IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceSetIOSurface, OnAcceleratedSurfaceSetIOSurface) IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, OnAcceleratedSurfaceBuffersSwapped) #endif + +#if defined(TOUCH_UI) + IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease, + OnAcceleratedSurfaceRelease) +#endif IPC_MESSAGE_UNHANDLED_ERROR() IPC_END_MESSAGE_MAP() @@ -215,7 +222,9 @@ void GpuProcessHostUIShim::OnResizeView(int32 renderer_id, Send(new GpuMsg_ResizeViewACK(renderer_id, command_buffer_route_id)); } -#elif defined(OS_MACOSX) +#endif + +#if defined(OS_MACOSX) || defined(TOUCH_UI) void GpuProcessHostUIShim::OnAcceleratedSurfaceSetIOSurface( const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params) { @@ -226,10 +235,17 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceSetIOSurface( RenderWidgetHostView* view = host->view(); if (!view) return; +#if defined(OS_MACOSX) view->AcceleratedSurfaceSetIOSurface(params.window, params.width, params.height, params.identifier); +#elif defined(TOUCH_UI) + view->AcceleratedSurfaceSetIOSurface( + params.width, params.height, params.identifier); + Send(new GpuMsg_AcceleratedSurfaceSetIOSurfaceACK( + params.renderer_id, params.route_id, params.identifier)); +#endif } void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped( @@ -243,6 +259,7 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped( RenderWidgetHostView* view = host->view(); if (!view) return; +#if defined (OS_MACOSX) view->AcceleratedSurfaceBuffersSwapped( // Parameters needed to swap the IOSurface. params.window, @@ -252,6 +269,30 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped( params.route_id, host_id_, params.swap_buffers_count); +#elif defined(TOUCH_UI) + view->AcceleratedSurfaceBuffersSwapped(params.surface_id); + Send(new GpuMsg_AcceleratedSurfaceBuffersSwappedACK( + params.renderer_id, params.route_id, params.swap_buffers_count)); +#endif +} + +#endif + +#if defined(TOUCH_UI) + +void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( + const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { + RenderViewHost* host = RenderViewHost::FromID(params.renderer_id, + params.render_view_id); + if (!host) + return; + RenderWidgetHostView* view = host->view(); + if (!view) + return; + view->AcceleratedSurfaceRelease(params.identifier); + + Send(new GpuMsg_AcceleratedSurfaceReleaseACK( + params.renderer_id, params.route_id, params.identifier)); } #endif diff --git a/content/browser/gpu/gpu_process_host_ui_shim.h b/content/browser/gpu/gpu_process_host_ui_shim.h index 02d8d79..7729fa2 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.h +++ b/content/browser/gpu/gpu_process_host_ui_shim.h @@ -25,6 +25,7 @@ class Size; } struct GPUCreateCommandBufferConfig; +struct GpuHostMsg_AcceleratedSurfaceRelease_Params; struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; @@ -97,13 +98,20 @@ class GpuProcessHostUIShim int32 render_view_id, int32 command_buffer_route_id, gfx::Size size); -#elif defined(OS_MACOSX) +#endif + +#if defined(OS_MACOSX) || defined(TOUCH_UI) void OnAcceleratedSurfaceSetIOSurface( const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params); void OnAcceleratedSurfaceBuffersSwapped( const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); #endif +#if defined(TOUCH_UI) + void OnAcceleratedSurfaceRelease( + const GpuHostMsg_AcceleratedSurfaceRelease_Params& params); +#endif + // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. int host_id_; }; |