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

Unified Diff: content/common/gpu/image_transport_surface_mac.cc

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, 8 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/image_transport_surface.cc ('k') | content/common/gpu/image_transport_surface_win.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_mac.cc
diff --git a/content/common/gpu/image_transport_surface_mac.cc b/content/common/gpu/image_transport_surface_mac.cc
index 8106f3bc52814fdf559d944a3d2fb8b08bb96a3a..6b8762c0ac4d505a9b41f886d0d1fea75a25e583 100644
--- a/content/common/gpu/image_transport_surface_mac.cc
+++ b/content/common/gpu/image_transport_surface_mac.cc
@@ -60,6 +60,7 @@ class IOSurfaceImageTransportSurface : public gfx::NoOpGLSurfaceCGL,
const AcceleratedSurfaceMsg_BufferPresented_Params& params) OVERRIDE;
virtual void OnResizeViewACK() OVERRIDE;
virtual void OnResize(gfx::Size size) OVERRIDE;
+ virtual void SetLatencyInfo(const cc::LatencyInfo&) OVERRIDE;
private:
virtual ~IOSurfaceImageTransportSurface() OVERRIDE;
@@ -95,6 +96,8 @@ class IOSurfaceImageTransportSurface : public gfx::NoOpGLSurfaceCGL,
// Whether we unscheduled command buffer because of pending SwapBuffers.
bool did_unschedule_;
+ cc::LatencyInfo latency_info_;
+
scoped_ptr<ImageTransportHelper> helper_;
DISALLOW_COPY_AND_ASSIGN(IOSurfaceImageTransportSurface);
@@ -228,6 +231,7 @@ bool IOSurfaceImageTransportSurface::SwapBuffers() {
GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
params.surface_handle = io_surface_handle_;
params.size = GetSize();
+ params.latency_info = latency_info_;
helper_->SendAcceleratedSurfaceBuffersSwapped(params);
DCHECK(!is_swap_buffers_pending_);
@@ -249,6 +253,7 @@ bool IOSurfaceImageTransportSurface::PostSubBuffer(
params.width = width;
params.height = height;
params.surface_size = GetSize();
+ params.latency_info = latency_info_;
helper_->SendAcceleratedSurfacePostSubBuffer(params);
DCHECK(!is_swap_buffers_pending_);
@@ -297,6 +302,11 @@ void IOSurfaceImageTransportSurface::OnResize(gfx::Size size) {
CreateIOSurface();
}
+void IOSurfaceImageTransportSurface::SetLatencyInfo(
+ const cc::LatencyInfo& latency_info) {
+ latency_info_ = latency_info;
+}
+
void IOSurfaceImageTransportSurface::UnrefIOSurface() {
// If we have resources to destroy, then make sure that we have a current
// context which we can use to delete the resources.
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | content/common/gpu/image_transport_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698