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

Unified Diff: content/common/gpu/image_transport_surface.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/image_transport_surface.h
diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h
index 17a2be6dc0e347c35db38abec4399d871f5b472f..b0e3cd4c7c6793d6d597f1aa4e4794b7f00e5b27 100644
--- a/content/common/gpu/image_transport_surface.h
+++ b/content/common/gpu/image_transport_surface.h
@@ -21,6 +21,7 @@
#include "ui/gfx/size.h"
#include "ui/gl/gl_surface.h"
#include "ui/surface/transport_dib.h"
+#include "webkit/compositor_bindings/web_latency_info_impl.h"
struct GpuHostMsg_AcceleratedSurfaceNew_Params;
struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
@@ -63,6 +64,8 @@ class ImageTransportSurface {
virtual void OnBufferPresented(uint64 surface_handle, uint32 sync_point) = 0;
virtual void OnResizeViewACK() = 0;
virtual void OnResize(gfx::Size size) = 0;
+ virtual void SetLatencyInfo(
+ const WebKit::WebLatencyInfoImpl& latency_info) = 0;
// Creates the appropriate surface depending on the GL implementation.
static scoped_refptr<gfx::GLSurface>
@@ -117,6 +120,8 @@ class ImageTransportHelper
void SendUpdateVSyncParameters(
base::TimeTicks timebase, base::TimeDelta interval);
+ void SendLatencyInfo(const WebKit::WebLatencyInfoImpl& latency_info);
+
// Whether or not we should execute more commands.
void SetScheduled(bool is_scheduled);
@@ -143,10 +148,13 @@ class ImageTransportHelper
// IPC::Message handlers.
void OnBufferPresented(uint64 surface_handle, uint32 sync_point);
void OnResizeViewACK();
+ void OnFrameDisplayed(const WebKit::WebLatencyInfoImpl& latency_info);
// Backbuffer resize callback.
void Resize(gfx::Size size);
+ void SetLatencyInfo(const WebKit::WebLatencyInfoImpl& latency_info);
+
// Weak pointers that point to objects that outlive this helper.
ImageTransportSurface* surface_;
GpuChannelManager* manager_;
@@ -182,6 +190,8 @@ class PassThroughImageTransportSurface
virtual void OnResizeViewACK() OVERRIDE;
virtual void OnResize(gfx::Size size) OVERRIDE;
virtual gfx::Size GetSize() OVERRIDE;
+ virtual void SetLatencyInfo(
+ const WebKit::WebLatencyInfoImpl& latency_info) OVERRIDE;
protected:
virtual ~PassThroughImageTransportSurface();
@@ -195,6 +205,7 @@ class PassThroughImageTransportSurface
gfx::Size new_size_;
bool transport_;
bool did_set_swap_interval_;
+ WebKit::WebLatencyInfoImpl latency_info_;
DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface);
};

Powered by Google App Engine
This is Rietveld 408576698