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

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 build Created 6 years, 12 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 b5759ed68bf5c4533b954daf41bcfda47595fd72..3a1b20160a280eaa6dc7cb733cb66ca96bfe989d 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);

Powered by Google App Engine
This is Rietveld 408576698