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

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

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.h
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h
index 73f53a779af1ad0b81d33bdec63eb3074ea60a23..2768cb62f99682adb47a24849040f06743d48090 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -24,6 +24,7 @@
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/common/command_buffer_shared.h"
#include "ipc/ipc_listener.h"
+#include "webkit/compositor_bindings/web_latency_info_impl.h"
struct GPUCommandBufferConsoleMessage;
@@ -43,6 +44,8 @@ class CommandBufferProxyImpl
public:
typedef base::Callback<void(
const std::string& msg, int id)> GpuConsoleMessageCallback;
+ typedef base::Callback<void(
+ const WebKit::WebLatencyInfoImpl&)> GpuLatencyInfoCallback;
CommandBufferProxyImpl(GpuChannelHost* channel, int route_id);
virtual ~CommandBufferProxyImpl();
@@ -126,6 +129,10 @@ class CommandBufferProxyImpl
void SetOnConsoleMessageCallback(
const GpuConsoleMessageCallback& callback);
+ void SetLatencyInfo(const WebKit::WebLatencyInfoImpl& latency_info);
+
+ void SetLatencyInfoCallback(const GpuLatencyInfoCallback& 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
@@ -155,6 +162,7 @@ class CommandBufferProxyImpl
void OnSetMemoryAllocation(const GpuMemoryAllocationForRenderer& allocation);
void OnSignalSyncPointAck(uint32 id);
void OnGenerateMailboxNamesReply(const std::vector<std::string>& names);
+ void OnSetLatencyInfo(const WebKit::WebLatencyInfoImpl& latency_info);
// Try to read an updated copy of the state from shared memory.
void TryUpdateState();
@@ -191,6 +199,8 @@ class CommandBufferProxyImpl
GpuConsoleMessageCallback console_message_callback_;
+ GpuLatencyInfoCallback latency_info_callback_;
+
// Tasks to be invoked in SignalSyncPoint responses.
uint32 next_signal_id_;
SignalTaskMap signal_tasks_;

Powered by Google App Engine
This is Rietveld 408576698