Teach JankTracker about new swap behaviors
Bug: 30440166
If we are using HWC2, there's a change in timing
when in triple buffering with the pipelined offsets.
This changes JankTracker to recognize that and silently
erase that from the total duration
Change-Id: Ib1fd4209070f17dbd2baed707c8cf73fb11c3cf2
diff --git a/libs/hwui/utils/TimeUtils.h b/libs/hwui/utils/TimeUtils.h
index 8d42d7e..ce181b7 100644
--- a/libs/hwui/utils/TimeUtils.h
+++ b/libs/hwui/utils/TimeUtils.h
@@ -21,10 +21,18 @@
namespace android {
namespace uirenderer {
+constexpr nsecs_t operator"" _s (unsigned long long s) {
+ return seconds_to_nanoseconds(s);
+}
+
constexpr nsecs_t operator"" _ms (unsigned long long ms) {
return milliseconds_to_nanoseconds(ms);
}
+constexpr nsecs_t operator"" _us (unsigned long long us) {
+ return microseconds_to_nanoseconds(us);
+}
+
} /* namespace uirenderer */
} /* namespace android */