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

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

Issue 123563002: Remove gpu side LatencyInfo merging (Closed) Base URL: http://git.chromium.org/chromium/src.git@gpu-per-event-latency-6-small
Patch Set: fix mac_rel compiler error. Move kMaxLatencyInfoNumber to .cc file Created 6 years, 11 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 691d22ce456dd8f089a3bfc9042affa80fe160fb..600a4d743b9c2873cc78172398334e9c6018c67d 100644
--- a/content/common/gpu/image_transport_surface_mac.cc
+++ b/content/common/gpu/image_transport_surface_mac.cc
@@ -63,7 +63,8 @@ class IOSurfaceImageTransportSurface
const AcceleratedSurfaceMsg_BufferPresented_Params& params) OVERRIDE;
virtual void OnResizeViewACK() OVERRIDE;
virtual void OnResize(gfx::Size size, float scale_factor) OVERRIDE;
- virtual void SetLatencyInfo(const ui::LatencyInfo&) OVERRIDE;
+ virtual void SetLatencyInfo(
+ const std::vector<ui::LatencyInfo>&) OVERRIDE;
virtual void WakeUpGpu() OVERRIDE;
// GpuCommandBufferStub::DestructionObserver implementation.
@@ -105,7 +106,7 @@ class IOSurfaceImageTransportSurface
// Whether we unscheduled command buffer because of pending SwapBuffers.
bool did_unschedule_;
- ui::LatencyInfo latency_info_;
+ std::vector<ui::LatencyInfo> latency_info_;
scoped_ptr<ImageTransportHelper> helper_;
@@ -249,7 +250,7 @@ bool IOSurfaceImageTransportSurface::SwapBuffers() {
params.surface_handle = io_surface_handle_;
params.size = GetSize();
params.scale_factor = scale_factor_;
- params.latency_info = latency_info_;
+ params.latency_info.swap(latency_info_);
helper_->SendAcceleratedSurfaceBuffersSwapped(params);
DCHECK(!is_swap_buffers_pending_);
@@ -272,7 +273,7 @@ bool IOSurfaceImageTransportSurface::PostSubBuffer(
params.height = height;
params.surface_size = GetSize();
params.surface_scale_factor = scale_factor_;
- params.latency_info = latency_info_;
+ params.latency_info.swap(latency_info_);
helper_->SendAcceleratedSurfacePostSubBuffer(params);
DCHECK(!is_swap_buffers_pending_);
@@ -324,8 +325,9 @@ void IOSurfaceImageTransportSurface::OnResize(gfx::Size size,
}
void IOSurfaceImageTransportSurface::SetLatencyInfo(
- const ui::LatencyInfo& latency_info) {
- latency_info_ = latency_info;
+ const std::vector<ui::LatencyInfo>& latency_info) {
+ for (size_t i = 0; i < latency_info.size(); i++)
+ latency_info_.push_back(latency_info[i]);
}
void IOSurfaceImageTransportSurface::WakeUpGpu() {
« 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