Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
index 7a86d4cc56b8e063ab541356c4e06b7783120c5e..5d83e701889adf0b15c962cc40d39750f1df8d85 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -1360,11 +1360,16 @@ void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped( |
params_in_pixel.route_id, |
gpu_host_id, |
params_in_pixel.mailbox_name); |
+ // TODO(miletus) : Pass the params_in_pixel.latency_info directly into |
+ // BuffersSwapped() once GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params |
+ // is converted to contain std::vector<ui::LatencyInfo>. |
+ std::vector<ui::LatencyInfo> latency_info; |
+ latency_info.push_back(params_in_pixel.latency_info); |
BuffersSwapped(params_in_pixel.size, |
gfx::Rect(params_in_pixel.size), |
params_in_pixel.scale_factor, |
params_in_pixel.mailbox_name, |
- params_in_pixel.latency_info, |
+ latency_info, |
ack_callback); |
} |
@@ -1372,7 +1377,7 @@ void RenderWidgetHostViewAura::SwapDelegatedFrame( |
uint32 output_surface_id, |
scoped_ptr<cc::DelegatedFrameData> frame_data, |
float frame_device_scale_factor, |
- const ui::LatencyInfo& latency_info) { |
+ const std::vector<ui::LatencyInfo>& latency_info) { |
DCHECK_NE(0u, frame_data->render_pass_list.size()); |
cc::RenderPass* root_pass = frame_data->render_pass_list.back(); |
@@ -1468,7 +1473,8 @@ void RenderWidgetHostViewAura::SwapDelegatedFrame( |
if (!compositor) { |
SendDelegatedFrameAck(output_surface_id); |
} else { |
- compositor->SetLatencyInfo(latency_info); |
+ for (size_t i = 0; i < latency_info.size(); i++) |
+ compositor->SetLatencyInfo(latency_info[i]); |
AddOnCommitCallbackAndDisableLocks( |
base::Bind(&RenderWidgetHostViewAura::SendDelegatedFrameAck, |
AsWeakPtr(), |
@@ -1522,7 +1528,7 @@ void RenderWidgetHostViewAura::SwapSoftwareFrame( |
uint32 output_surface_id, |
scoped_ptr<cc::SoftwareFrameData> frame_data, |
float frame_device_scale_factor, |
- const ui::LatencyInfo& latency_info) { |
+ const std::vector<ui::LatencyInfo>& latency_info) { |
const gfx::Size& frame_size = frame_data->size; |
const gfx::Rect& damage_rect = frame_data->damage_rect; |
gfx::Size frame_size_in_dip = |
@@ -1566,7 +1572,8 @@ void RenderWidgetHostViewAura::SwapSoftwareFrame( |
ui::Compositor* compositor = GetCompositor(); |
if (compositor) { |
- compositor->SetLatencyInfo(latency_info); |
+ for (size_t i = 0; i < latency_info.size(); i++) |
+ compositor->SetLatencyInfo(latency_info[i]); |
AddOnCommitCallbackAndDisableLocks( |
base::Bind(&RenderWidgetHostViewAura::SendSoftwareFrameAck, |
AsWeakPtr(), |
@@ -1685,7 +1692,7 @@ void RenderWidgetHostViewAura::BuffersSwapped( |
const gfx::Rect& damage_rect, |
float surface_scale_factor, |
const std::string& mailbox_name, |
- const ui::LatencyInfo& latency_info, |
+ const std::vector<ui::LatencyInfo>& latency_info, |
const BufferPresentedCallback& ack_callback) { |
scoped_refptr<ui::Texture> previous_texture(current_surface_); |
const gfx::Rect surface_rect = gfx::Rect(surface_size); |
@@ -1745,7 +1752,8 @@ void RenderWidgetHostViewAura::BuffersSwapped( |
if (paint_observer_) |
paint_observer_->OnUpdateCompositorContent(); |
window_->SchedulePaintInRect(rect_to_paint); |
- compositor->SetLatencyInfo(latency_info); |
+ for (size_t i = 0; i < latency_info.size(); i++) |
+ compositor->SetLatencyInfo(latency_info[i]); |
} |
SwapBuffersCompleted(ack_callback, previous_texture); |
@@ -1763,11 +1771,16 @@ void RenderWidgetHostViewAura::AcceleratedSurfacePostSubBuffer( |
params_in_pixel.route_id, |
gpu_host_id, |
params_in_pixel.mailbox_name); |
+ // TODO(miletus) : Pass the params_in_pixel.latency_info directly into |
+ // BuffersSwapped() once GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params |
+ // is converted to contain std::vector<ui::LatencyInfo>. |
+ std::vector<ui::LatencyInfo> latency_info; |
+ latency_info.push_back(params_in_pixel.latency_info); |
BuffersSwapped(params_in_pixel.surface_size, |
damage_rect, |
params_in_pixel.surface_scale_factor, |
params_in_pixel.mailbox_name, |
- params_in_pixel.latency_info, |
+ latency_info, |
ack_callback); |
} |