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

Unified Diff: content/browser/renderer_host/compositing_iosurface_mac.mm

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
Index: content/browser/renderer_host/compositing_iosurface_mac.mm
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.mm b/content/browser/renderer_host/compositing_iosurface_mac.mm
index 606ffe5ec370bea0962323f49df37d7fc0845387..78a3eda3b91de4a69913e732d002abceb6101a4b 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -332,7 +332,7 @@ bool CompositingIOSurfaceMac::SetIOSurface(
uint64 io_surface_handle,
const gfx::Size& size,
float scale_factor,
- const ui::LatencyInfo& latency_info) {
+ const std::vector<ui::LatencyInfo>& latency_info) {
pixel_io_surface_size_ = size;
scale_factor_ = scale_factor;
dip_io_surface_size_ = gfx::ToFlooredSize(
@@ -345,7 +345,9 @@ bool CompositingIOSurfaceMac::SetIOSurface(
}
bool result = MapIOSurfaceToTexture(io_surface_handle);
CGLSetCurrentContext(0);
- latency_info_.MergeWith(latency_info);
+ for (size_t i = 0; i < latency_info.size(); i++) {
+ latency_info_.push_back(latency_info[i]);
+ }
return result;
}
@@ -495,10 +497,12 @@ bool CompositingIOSurfaceMac::DrawIOSurface(
result = false;
}
- latency_info_.AddLatencyNumber(
- ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
+ for (size_t i = 0; i < latency_info_.size(); i++) {
+ latency_info_[i].AddLatencyNumber(
+ ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
+ }
RenderWidgetHostImpl::CompositorFrameDrawn(latency_info_);
- latency_info_.Clear();
+ latency_info_.clear();
// Try to finish previous copy requests after flush to get better pipelining.
CheckIfAllCopiesAreFinished(false);
« no previous file with comments | « content/browser/renderer_host/compositing_iosurface_mac.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698