diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-25 14:55:40 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-25 14:55:40 +0000 |
commit | 1cf99aa4097c941fbd3295eee277b40a947978df (patch) | |
tree | 1ea1af795f6e5214870ba5ff463316b558e2e0ad /content/browser/gpu | |
parent | 5a9299c645bfa4fcbbc3b3106af2837e2b9f7ec1 (diff) | |
download | chromium_src-1cf99aa4097c941fbd3295eee277b40a947978df.zip chromium_src-1cf99aa4097c941fbd3295eee277b40a947978df.tar.gz chromium_src-1cf99aa4097c941fbd3295eee277b40a947978df.tar.bz2 |
Revert 90511 - Use pixmaps and EGLImages to transport image data between GPU process and browser. Behind a compile TOUCH_UI flag.
It uses the MAC OSX AcceleratedSurface IPCs to communicate between the GPU process and browser. The major difference between the OSX display path is that I send an ACK back after AcceleratedSurfaceSetIOSurface because the process of binding a texture to the pixmap may destroy the contents of the pixmap.
BUG=none
TEST=by hand on Linux (w/ and w/o TOUCH_UI), Windows, and Mac
Review URL: http://codereview.chromium.org/6987014
TBR=backer@chromium.org
Review URL: http://codereview.chromium.org/7261016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90512 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, 3 insertions, 52 deletions
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc index 2bd04f1..0abee9f 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.cc +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc @@ -149,19 +149,12 @@ bool GpuProcessHostUIShim::OnControlMessageReceived( OnLogMessage) #if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) || defined(OS_WIN) IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) -#endif - -#if defined(OS_MACOSX) || defined(TOUCH_UI) +#elif defined(OS_MACOSX) 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() @@ -222,9 +215,7 @@ void GpuProcessHostUIShim::OnResizeView(int32 renderer_id, Send(new GpuMsg_ResizeViewACK(renderer_id, command_buffer_route_id)); } -#endif - -#if defined(OS_MACOSX) || defined(TOUCH_UI) +#elif defined(OS_MACOSX) void GpuProcessHostUIShim::OnAcceleratedSurfaceSetIOSurface( const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params) { @@ -235,17 +226,10 @@ 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( @@ -259,7 +243,6 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped( RenderWidgetHostView* view = host->view(); if (!view) return; -#if defined (OS_MACOSX) view->AcceleratedSurfaceBuffersSwapped( // Parameters needed to swap the IOSurface. params.window, @@ -269,30 +252,6 @@ 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 7729fa2..02d8d79 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.h +++ b/content/browser/gpu/gpu_process_host_ui_shim.h @@ -25,7 +25,6 @@ class Size; } struct GPUCreateCommandBufferConfig; -struct GpuHostMsg_AcceleratedSurfaceRelease_Params; struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; @@ -98,20 +97,13 @@ class GpuProcessHostUIShim int32 render_view_id, int32 command_buffer_route_id, gfx::Size size); -#endif - -#if defined(OS_MACOSX) || defined(TOUCH_UI) +#elif defined(OS_MACOSX) 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_; }; |