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

Unified Diff: ui/gl/angle_platform_impl.cc

Issue 1122153002: Fixit: Fork base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FIXIT_timeclasses_1of2
Patch Set: REBASE after it passed CQ but did not commit to tree Created 5 years, 7 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 | « ui/events/latency_info.cc ('k') | ui/gl/gpu_timing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/angle_platform_impl.cc
diff --git a/ui/gl/angle_platform_impl.cc b/ui/gl/angle_platform_impl.cc
index 5ad8b51d54436259377f70390252bf9d49ec3906..f534e98e32d7d05082f3e96a08ad629168afcf29 100644
--- a/ui/gl/angle_platform_impl.cc
+++ b/ui/gl/angle_platform_impl.cc
@@ -21,8 +21,7 @@ double ANGLEPlatformImpl::currentTime() {
}
double ANGLEPlatformImpl::monotonicallyIncreasingTime() {
- return base::TimeTicks::Now().ToInternalValue() /
- static_cast<double>(base::Time::kMicrosecondsPerSecond);
+ return (base::TraceTicks::Now() - base::TraceTicks()).InSecondsF();
}
const unsigned char* ANGLEPlatformImpl::getTraceCategoryEnabledFlag(
@@ -41,8 +40,8 @@ angle::Platform::TraceEventHandle ANGLEPlatformImpl::addTraceEvent(
const unsigned char* arg_types,
const unsigned long long* arg_values,
unsigned char flags) {
- base::TimeTicks timestamp_tt = base::TimeTicks::FromInternalValue(
- static_cast<int64>(timestamp * base::Time::kMicrosecondsPerSecond));
+ base::TraceTicks timestamp_tt =
+ base::TraceTicks() + base::TimeDelta::FromSecondsD(timestamp);
base::trace_event::TraceEventHandle handle =
TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP(
phase, category_group_enabled, name, id,
« no previous file with comments | « ui/events/latency_info.cc ('k') | ui/gl/gpu_timing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698