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

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

Issue 15682010: Support plumbing LatencyInfo through the old software path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 0a6ea3e39b8f6cba2e9ec0626b01fb4dd1b9ad28..12040d1396bc47c54012713c1d2984f2d75ae23c 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -724,9 +724,12 @@ void RenderWidgetHostViewMac::ImeCompositionRangeChanged(
void RenderWidgetHostViewMac::DidUpdateBackingStore(
const gfx::Rect& scroll_rect,
const gfx::Vector2d& scroll_delta,
- const std::vector<gfx::Rect>& copy_rects) {
+ const std::vector<gfx::Rect>& copy_rects,
+ const ui::LatencyInfo& latency_info) {
GotSoftwareFrame();
+ software_latency_info_.MergeWith(latency_info);
+
if (!is_hidden_) {
std::vector<gfx::Rect> rects(copy_rects);
@@ -1593,6 +1596,12 @@ gfx::Rect RenderWidgetHostViewMac::GetScaledOpenGLPixelRect(
ScaleFactor(cocoa_view_)));
}
+void RenderWidgetHostViewMac::FrameSwapped() {
+ software_latency_info_.swap_timestamp = base::TimeTicks::HighResNow();
+ render_widget_host_->FrameSwapped(software_latency_info_);
+ software_latency_info_.Clear();
+}
+
} // namespace content
// RenderWidgetHostViewCocoa ---------------------------------------------------
@@ -2384,6 +2393,8 @@ gfx::Rect RenderWidgetHostViewMac::GetScaledOpenGLPixelRect(
}
}
+ renderWidgetHostView_->FrameSwapped();
+
// Fill the remaining portion of the damagedRect with white
[self fillBottomRightRemainderOfRect:bitmapRect dirtyRect:damagedRect];

Powered by Google App Engine
This is Rietveld 408576698