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

Unified Diff: content/renderer/gpu/command_buffer_proxy.cc

Issue 8198017: Allow FlushSyncs to short circuit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/command_buffer_proxy.cc
diff --git a/content/renderer/gpu/command_buffer_proxy.cc b/content/renderer/gpu/command_buffer_proxy.cc
index 732703f64f210ed51daa0c7ff440fe4d9ff32425..9ade326b4ab59abe719511c40c58fe2556c617f6 100644
--- a/content/renderer/gpu/command_buffer_proxy.cc
+++ b/content/renderer/gpu/command_buffer_proxy.cc
@@ -181,6 +181,8 @@ void CommandBufferProxy::Flush(int32 put_offset) {
if (last_state_.error != gpu::error::kNoError)
return;
+ TRACE_EVENT1("gpu", "CommandBufferProxy::Flush", "put_offset", put_offset);
+
Send(new GpuCommandBufferMsg_AsyncFlush(route_id_,
put_offset,
++flush_count_));
@@ -188,20 +190,17 @@ void CommandBufferProxy::Flush(int32 put_offset) {
gpu::CommandBuffer::State CommandBufferProxy::FlushSync(int32 put_offset,
int32 last_known_get) {
- TRACE_EVENT0("gpu", "CommandBufferProxy::FlushSync");
+ TRACE_EVENT1("gpu", "CommandBufferProxy::FlushSync", "put_offset",
+ put_offset);
+ Flush(put_offset);
if (last_known_get == last_state_.get_offset) {
// Send will flag state with lost context if IPC fails.
if (last_state_.error == gpu::error::kNoError) {
gpu::CommandBuffer::State state;
- if (Send(new GpuCommandBufferMsg_Flush(route_id_,
- put_offset,
- last_known_get,
- ++flush_count_,
- &state)))
+ if (Send(new GpuCommandBufferMsg_GetStateFast(route_id_,
+ &state)))
OnUpdateState(state);
}
- } else {
- Flush(put_offset);
}
return last_state_;
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698