Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 8625003: Revert 111040 - Reland 110355 - Use shared D3D9 texture to transport the compositor's backing buf... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_process_host_ui_shim.cc
===================================================================
--- content/browser/gpu/gpu_process_host_ui_shim.cc (revision 111041)
+++ content/browser/gpu/gpu_process_host_ui_shim.cc (working copy)
@@ -171,14 +171,13 @@
IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message)
IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage,
OnLogMessage)
- IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
- OnAcceleratedSurfaceBuffersSwapped)
-
#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) || defined(OS_WIN)
IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView)
#endif
#if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
+ IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
+ OnAcceleratedSurfaceBuffersSwapped)
IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceNew,
OnAcceleratedSurfaceNew)
#endif
@@ -187,7 +186,6 @@
IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease,
OnAcceleratedSurfaceRelease)
#endif
-
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
@@ -209,14 +207,15 @@
void GpuProcessHostUIShim::OnResizeView(int32 renderer_id,
int32 render_view_id,
- int32 route_id,
+ int32 command_buffer_route_id,
gfx::Size size) {
// Always respond even if the window no longer exists. The GPU process cannot
// make progress on the resizing command buffer until it receives the
// response.
ScopedSendOnIOThread delayed_send(
host_id_,
- new AcceleratedSurfaceMsg_ResizeViewACK(route_id));
+ new GpuMsg_ResizeViewACK(renderer_id,
+ command_buffer_route_id));
RenderViewHost* host = RenderViewHost::FromID(renderer_id, render_view_id);
if (!host)
@@ -313,8 +312,6 @@
params.route_id, surface_id, surface_handle));
}
-#endif
-
void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) {
TRACE_EVENT0("renderer",
@@ -335,10 +332,24 @@
delayed_send.Cancel();
- // View must send ACK message after next composite.
- view->AcceleratedSurfaceBuffersSwapped(params, host_id_);
+#if defined (OS_MACOSX)
+ view->AcceleratedSurfaceBuffersSwapped(
+ // Parameters needed to swap the IOSurface.
+ params.window,
+ params.surface_id,
+ // Parameters needed to formulate an acknowledgment.
+ params.renderer_id,
+ params.route_id,
+ host_id_);
+#else // defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
+ // view must send ACK message after next composite
+ view->AcceleratedSurfaceBuffersSwapped(
+ params.surface_id, params.route_id, host_id_);
+#endif
}
+#endif
+
#if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease(
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.h ('k') | content/browser/renderer_host/render_widget_host_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698