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

Unified Diff: content/common/gpu/image_transport_surface.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/image_transport_surface.h
diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h
index b4b7a4965fd2e6c2e849162ed933e55b654bbcb9..f31ba575317b6b5123e3fb161b9a3c3a6cbbdcab 100644
--- a/content/common/gpu/image_transport_surface.h
+++ b/content/common/gpu/image_transport_surface.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "cc/latency_info.h"
#include "content/common/content_export.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_message.h"
@@ -63,6 +64,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>
@@ -111,6 +114,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);
@@ -138,10 +143,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_;
@@ -178,6 +186,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();
@@ -193,6 +203,7 @@ class PassThroughImageTransportSurface
bool did_set_swap_interval_;
bool did_unschedule_;
bool is_swap_buffers_pending_;
+ cc::LatencyInfo latency_info_;
DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface);
};

Powered by Google App Engine
This is Rietveld 408576698