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

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

Issue 8060045: Use shared D3D9 texture to transport the compositor's backing buffer to the browser... (Closed) Base URL: svn://chrome-svn/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 108480)
+++ content/browser/gpu/gpu_process_host_ui_shim.cc (working copy)
@@ -173,13 +173,14 @@
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
@@ -188,6 +189,7 @@
IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease,
OnAcceleratedSurfaceRelease)
#endif
+
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
@@ -209,15 +211,14 @@
void GpuProcessHostUIShim::OnResizeView(int32 renderer_id,
int32 render_view_id,
- int32 command_buffer_route_id,
+ int32 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 GpuMsg_ResizeViewACK(renderer_id,
- command_buffer_route_id));
+ new AcceleratedSurfaceMsg_ResizeViewACK(route_id));
RenderViewHost* host = RenderViewHost::FromID(renderer_id, render_view_id);
if (!host)
@@ -314,6 +315,8 @@
params.route_id, surface_id, surface_handle));
}
+#endif
+
void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) {
TRACE_EVENT0("renderer",
@@ -334,24 +337,10 @@
delayed_send.Cancel();
-#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
+ // View must send ACK message after next composite.
+ view->AcceleratedSurfaceBuffersSwapped(params, host_id_);
}
-#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