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

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: 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/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 0519e8c7fd0f30e967e4d8cdc68f5c7d04c4207e..166e30c33e49b743fa63fd4e1a1ff1a340ff9d86 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -28,6 +28,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 WebKit::WebLatencyInfoImpl&)>
+ 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 WebKit::WebLatencyInfoImpl& latency_info);
+
private:
GpuMemoryManager* GetMemoryManager();
bool MakeCurrent();
@@ -185,6 +193,7 @@ class GpuCommandBufferStub
void OnCommandProcessed();
void OnParseError();
+ void OnSetLatencyInfo(const WebKit::WebLatencyInfoImpl& latency_info);
void ReportState();
@@ -246,6 +255,8 @@ class GpuCommandBufferStub
scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_;
+ LatencyInfoCallback latency_info_callback_;
+
GURL active_url_;
size_t active_url_hash_;

Powered by Google App Engine
This is Rietveld 408576698