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

Unified Diff: content/common/gpu/client/command_buffer_proxy_impl.h

Issue 781683005: Ozone: Avoid blocking in Swapbuffer Call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unintended changes. Created 6 years 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/common/gpu/client/command_buffer_proxy_impl.h
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h
index ea3974029cd1f820de57afbd8895504bed5ed174..45529c8de87f097608cd75ee5f95acb5d63284ce 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -138,6 +138,11 @@ class CommandBufferProxyImpl
void SetSwapBuffersCompletionCallback(
const SwapBuffersCompletionCallback& callback);
+ typedef base::Callback<void()>
+ PageFlipCompletionCallback;
+ void SetPageFlipCompletionCallback(
+ const PageFlipCompletionCallback& callback);
+
// TODO(apatrick): this is a temporary optimization while skia is calling
// ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6
// ints redundantly when only the error is needed for the
@@ -168,6 +173,7 @@ class CommandBufferProxyImpl
void OnSetMemoryAllocation(const gpu::MemoryAllocation& allocation);
void OnSignalSyncPointAck(uint32 id);
void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info);
+ void OnPageFlipCompleted();
// Try to read an updated copy of the state from shared memory.
void TryUpdateState();
@@ -209,6 +215,7 @@ class CommandBufferProxyImpl
std::vector<ui::LatencyInfo> latency_info_;
SwapBuffersCompletionCallback swap_buffers_completion_callback_;
+ PageFlipCompletionCallback page_flip_completion_callback_;
DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
};

Powered by Google App Engine
This is Rietveld 408576698