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

Unified Diff: content/renderer/render_widget.cc

Issue 864943002: Replaces instances of the deprecated TimeTicks::HighResNow() with TimeTicks::Now(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More changes based on review comments. Created 5 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/renderer/input/input_handler_proxy.cc ('k') | content/renderer/skia_benchmarking_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index c2eefbd766a8c00c252c1c06c249675af13d37fa..f4dfc452bf94d987d7542021e9f4ec29d1635e1e 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1064,8 +1064,8 @@ void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event,
&latency_info);
base::TimeTicks start_time;
- if (base::TimeTicks::IsHighResNowFastAndReliable())
- start_time = base::TimeTicks::HighResNow();
+ if (base::TimeTicks::IsHighResolution())
+ start_time = base::TimeTicks::Now();
TRACE_EVENT1("renderer", "RenderWidget::OnHandleInputEvent",
"event", WebInputEventTraits::GetName(input_event->type));
@@ -1169,13 +1169,13 @@ void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event,
bool frame_pending = compositor_ && compositor_->BeginMainFrameRequested();
- // If we don't have a fast and accurate HighResNow, we assume the input
- // handlers are heavy and rate limit them.
+ // If we don't have a fast and accurate Now(), we assume the input handlers
+ // are heavy and rate limit them.
bool rate_limiting_wanted =
input_event->type == WebInputEvent::MouseMove ||
input_event->type == WebInputEvent::MouseWheel;
if (rate_limiting_wanted && !start_time.is_null()) {
- base::TimeTicks end_time = base::TimeTicks::HighResNow();
+ base::TimeTicks end_time = base::TimeTicks::Now();
total_input_handling_time_this_frame_ += (end_time - start_time);
rate_limiting_wanted =
total_input_handling_time_this_frame_.InMicroseconds() >
« no previous file with comments | « content/renderer/input/input_handler_proxy.cc ('k') | content/renderer/skia_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698