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

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

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor input event changes Created 8 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.cc
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index c60d84c1f62eb776a07008589d77ba21a1c7f35a..bf4b7a5a7228a0aeadf077f575e5a607f4a039dd 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -70,6 +70,8 @@ bool CommandBufferProxyImpl::OnMessageReceived(const IPC::Message& message) {
OnSetMemoryAllocation);
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalSyncPointAck,
OnSignalSyncPointAck);
+ IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetLatencyInfo,
+ OnSetLatencyInfo);
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -213,6 +215,22 @@ void CommandBufferProxyImpl::Flush(int32 put_offset) {
++flush_count_));
}
+void CommandBufferProxyImpl::SetLatencyInfo(
+ const WebKit::WebLatencyInfoImpl& latency_info) {
+ Send(new GpuCommandBufferMsg_SetLatencyInfo(route_id_, latency_info));
+}
+
+void CommandBufferProxyImpl::SetLatencyInfoCallback(
+ const GpuLatencyInfoCallback& callback) {
+ latency_info_callback_ = callback;
+}
+
+void CommandBufferProxyImpl::OnSetLatencyInfo(
+ const WebKit::WebLatencyInfoImpl& latency_info) {
+ if (!latency_info_callback_.is_null())
+ latency_info_callback_.Run(latency_info);
+}
+
gpu::CommandBuffer::State CommandBufferProxyImpl::FlushSync(
int32 put_offset,
int32 last_known_get) {

Powered by Google App Engine
This is Rietveld 408576698