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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 7762013: Added GPU process "echo" IPC message. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months 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/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
===================================================================
--- content/common/gpu/gpu_command_buffer_stub.cc (revision 98655)
+++ content/common/gpu/gpu_command_buffer_stub.cc (working copy)
@@ -197,8 +197,12 @@
NewCallback(this, &GpuCommandBufferStub::OnParseError));
scheduler_->SetScheduledCallback(
NewCallback(channel_, &GpuChannel::OnScheduled));
+
+#if defined(OS_MACOSX)
scheduler_->SetSwapBuffersCallback(
NewCallback(this, &GpuCommandBufferStub::OnSwapBuffers));
+#endif
+
// On TOUCH_UI, the ImageTransportSurface handles co-ordinating the
// resize with the browser process. The ImageTransportSurface sets it's
// own resize callback, so we shouldn't do it here.
@@ -407,11 +411,9 @@
Send(reply_message);
}
+#if defined(OS_MACOSX)
void GpuCommandBufferStub::OnSwapBuffers() {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSwapBuffers");
- ReportState();
-
-#if defined(OS_MACOSX)
if (handle_) {
// To swap on OSX, we have to send a message to the browser to get the
// context put onscreen.
@@ -427,11 +429,8 @@
new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params));
scheduler_->SetScheduled(false);
}
-#else
- // Notify the upstream commandbuffer that the swapbuffers has completed.
- Send(new GpuCommandBufferMsg_SwapBuffers(route_id_));
-#endif
}
+#endif
void GpuCommandBufferStub::OnCommandProcessed() {
if (watchdog_)
@@ -455,10 +454,9 @@
scheduler_->set_acknowledged_swap_buffers_count(swap_buffers_count);
for(uint64 i = 0; i < delta; i++) {
- // Notify the upstream commandbuffer that the swapbuffers has completed.
- Send(new GpuCommandBufferMsg_SwapBuffers(route_id_));
-
- // Wake up the GpuScheduler to start doing work again.
+ // Wake up the GpuScheduler to start doing work again. When the scheduler
+ // wakes up, it will send any deferred echo acknowledgements, triggering
+ // associated swapbuffer callbacks.
scheduler_->SetScheduled(true);
}
}
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698