Adjust for pipeline stalls
Bug: 20853441
Calculating duration that crosses the UI-RT
sync point will now subtract out the time spent waiting
in queue under the assumption that this time will be
accounted for in the previous frame's metrics
Change-Id: Ia8213f4410638840613f5ae439e98dfb77532a6a
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp
index 5c0801e..eb9b55f 100644
--- a/libs/hwui/JankTracker.cpp
+++ b/libs/hwui/JankTracker.cpp
@@ -31,7 +31,7 @@
"High input latency",
"Slow UI thread",
"Slow bitmap uploads",
- "Slow draw",
+ "Slow issue draw commands",
};
struct Comparison {
@@ -223,7 +223,7 @@
mData->jankFrameCount++;
for (int i = 0; i < NUM_BUCKETS; i++) {
- int64_t delta = frame[COMPARISONS[i].end] - frame[COMPARISONS[i].start];
+ int64_t delta = frame.duration(COMPARISONS[i].start, COMPARISONS[i].end);
if (delta >= mThresholds[i] && delta < IGNORE_EXCEEDING) {
mData->jankTypeCounts[i]++;
}