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

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: 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
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/image_transport_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 926a35d4d91db3d483cd087680492e17e34a19b3..dca9c6039f771eb3126eea949dd1f856e08a6787 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 AcceleratedSurfaceMsg_BufferPresented_Params;
struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
@@ -64,6 +65,8 @@ class ImageTransportSurface {
const AcceleratedSurfaceMsg_BufferPresented_Params& params) = 0;
virtual void OnResizeViewACK() = 0;
virtual void OnResize(gfx::Size size) = 0;
+ virtual void SetLatencyInfo(
+ const cc::LatencyInfo& latency_info) = 0;
// Creates the appropriate surface depending on the GL implementation.
static scoped_refptr<gfx::GLSurface>
@@ -116,6 +119,8 @@ class ImageTransportHelper
void SendUpdateVSyncParameters(
base::TimeTicks timebase, base::TimeDelta interval);
+ void SendLatencyInfo(const cc::LatencyInfo& latency_info);
+
// Whether or not we should execute more commands.
void SetScheduled(bool is_scheduled);
@@ -143,10 +148,13 @@ class ImageTransportHelper
void OnBufferPresented(
const AcceleratedSurfaceMsg_BufferPresented_Params& params);
void OnResizeViewACK();
+ void OnFrameDisplayed(const cc::LatencyInfo& latency_info);
// Backbuffer resize callback.
void Resize(gfx::Size size);
+ void SetLatencyInfo(const cc::LatencyInfo& 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 cc::LatencyInfo& latency_info) OVERRIDE;
protected:
virtual ~PassThroughImageTransportSurface();
@@ -195,6 +205,7 @@ class PassThroughImageTransportSurface
gfx::Size new_size_;
bool transport_;
bool did_set_swap_interval_;
+ cc::LatencyInfo latency_info_;
DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface);
};
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698