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

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

Issue 12614013: Plumb cc::LatencyInfo through command buffer and output surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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 95f3c60eb1dd6f5d341174254006af4f3be2bae5..fac3eca93ed54c9e46189435b3ed96d4b94eb9d4 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -16,6 +16,7 @@
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "cc/latency_info.h"
#include "content/common/gpu/gpu_memory_allocation.h"
#include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
#include "content/common/gpu/gpu_memory_allocation.h"
@@ -45,6 +46,8 @@ class CommandBufferProxyImpl
public:
typedef base::Callback<void(
const std::string& msg, int id)> GpuConsoleMessageCallback;
+ typedef base::Callback<void(
+ const cc::LatencyInfo&)> GpuLatencyInfoCallback;
CommandBufferProxyImpl(GpuChannelHost* channel, int route_id);
virtual ~CommandBufferProxyImpl();
@@ -113,6 +116,10 @@ class CommandBufferProxyImpl
void SetOnConsoleMessageCallback(
const GpuConsoleMessageCallback& callback);
+ void SetLatencyInfo(const cc::LatencyInfo& 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
@@ -141,6 +148,7 @@ class CommandBufferProxyImpl
void OnSetMemoryAllocation(const GpuMemoryAllocationForRenderer& allocation);
void OnSignalSyncPointAck(uint32 id);
void OnGenerateMailboxNamesReply(const std::vector<std::string>& names);
+ void OnSetLatencyInfo(const cc::LatencyInfo& latency_info);
// Try to read an updated copy of the state from shared memory.
void TryUpdateState();
@@ -181,6 +189,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