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

Unified Diff: chrome/gpu/gpu_command_buffer_stub.cc

Issue 5317007: Add flow control between renderer and GPU processes, and, on Mac OS X,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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: chrome/gpu/gpu_command_buffer_stub.cc
===================================================================
--- chrome/gpu/gpu_command_buffer_stub.cc (revision 67289)
+++ chrome/gpu/gpu_command_buffer_stub.cc (working copy)
@@ -197,10 +197,26 @@
}
void GpuCommandBufferStub::SwapBuffersCallback() {
+ OnSwapBuffers();
ChildThread* gpu_thread = ChildThread::current();
- gpu_thread->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(
- renderer_id_, render_view_id_, handle_, processor_->GetSurfaceId()));
+ GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
+ params.renderer_id = renderer_id_;
+ params.render_view_id = render_view_id_;
+ params.window = handle_;
+ params.surface_id = processor_->GetSurfaceId();
+ params.route_id = route_id();
+#if defined(OS_MACOSX)
+ params.swap_buffers_count = processor_->swap_buffers_count();
+#endif
+ gpu_thread->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params));
}
+
+void GpuCommandBufferStub::AcceleratedSurfaceBuffersSwapped(
+ uint64 swap_buffers_count) {
+ processor_->set_acknowledged_swap_buffers_count(swap_buffers_count);
+ // Wake up the GpuProcessor to start doing work again.
+ processor_->ScheduleProcessCommands();
+}
#endif // defined(OS_MACOSX)
#endif // ENABLE_GPU

Powered by Google App Engine
This is Rietveld 408576698