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

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

Issue 8513013: Plumb the partial swap though image transport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now with a few compile fixes (tested Win, Mac, Linux, and Aura) 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
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.h ('k') | content/browser/renderer_host/render_widget_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host_ui_shim.cc
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index 503a429132d1feea86b83795da8cb9bf80c0e94c..e7bda6d89c7887b249270ace2baf1bf7837e1341 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -174,6 +174,8 @@ bool GpuProcessHostUIShim::OnControlMessageReceived(
IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
OnAcceleratedSurfaceBuffersSwapped)
+ IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfacePostSubBuffer,
+ OnAcceleratedSurfacePostSubBuffer)
#if defined(TOOLKIT_USES_GTK) || defined(OS_WIN)
IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView)
@@ -340,6 +342,30 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
view->AcceleratedSurfaceBuffersSwapped(params, host_id_);
}
+void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer(
+ const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) {
+ TRACE_EVENT0("renderer",
+ "GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer");
+
+ ScopedSendOnIOThread delayed_send(
+ host_id_,
+ new AcceleratedSurfaceMsg_PostSubBufferACK(params.route_id));
+
+ RenderViewHost* host = RenderViewHost::FromID(params.renderer_id,
+ params.render_view_id);
+ if (!host)
+ return;
+
+ RenderWidgetHostView* view = host->view();
+ if (!view)
+ return;
+
+ delayed_send.Cancel();
+
+ // View must send ACK message after next composite.
+ view->AcceleratedSurfacePostSubBuffer(params, host_id_);
+}
+
#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.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698