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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.h

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: create cc::LatencyInfo Created 7 years, 12 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/gpu_command_buffer_stub.h
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index c133eccdc4750fc3f3a8d0a4567b32e09df1d34b..64cb4c9444e38b8325d081908da8fad948185ee2 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -29,6 +29,7 @@
#include "ui/gl/gl_surface.h"
#include "ui/gl/gpu_preference.h"
#include "ui/surface/transport_dib.h"
+#include "webkit/compositor_bindings/web_latency_info_impl.h"
#if defined(OS_MACOSX)
#include "ui/surface/accelerated_surface_mac.h"
@@ -62,6 +63,9 @@ class GpuCommandBufferStub
virtual ~DestructionObserver() {}
};
+ typedef base::Callback<void(const cc::LatencyInfo&)>
+ LatencyInfoCallback;
+
GpuCommandBufferStub(
GpuChannel* channel,
GpuCommandBufferStub* share_group,
@@ -132,6 +136,10 @@ class GpuCommandBufferStub
void SetPreemptByCounter(scoped_refptr<gpu::RefCountedCounter> counter);
+ void SetLatencyInfoCallback(const LatencyInfoCallback& callback);
+
+ void SetLatencyInfo(const cc::LatencyInfo& latency_info);
+
private:
GpuMemoryManager* GetMemoryManager();
bool MakeCurrent();
@@ -181,6 +189,7 @@ class GpuCommandBufferStub
void OnCommandProcessed();
void OnParseError();
+ void OnSetLatencyInfo(const cc::LatencyInfo& latency_info);
void ReportState();
@@ -244,6 +253,8 @@ class GpuCommandBufferStub
scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_;
+ LatencyInfoCallback latency_info_callback_;
+
GURL active_url_;
size_t active_url_hash_;
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698