summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-10-19 10:08:16 -0700
committerXin Li <delphij@google.com>2020-10-19 10:08:16 -0700
commit6922a97ee2173a257cc6c3006e51eb437f9686de (patch)
tree6a5704cda0d8a8ab1734702a62b2258543e2acd4 /libs
parentb3230cd639be832c1650e419d5b91aef9f94a324 (diff)
parent35a2a4c3fdae3d6827ffbc3480365e2ac0ed081b (diff)
Merge redfin/bramble support.
Bug: 171218636 Merged-In: I25b60e5225247a335cdc0dcd751de47374cdcfbb Change-Id: Ibc9bb80173f3ba92f91973e047a7451587b67235
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/JankTracker.cpp3
-rw-r--r--libs/hwui/JankTracker.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp
index d25fc4b0b03e..b2c39c90071a 100644
--- a/libs/hwui/JankTracker.cpp
+++ b/libs/hwui/JankTracker.cpp
@@ -139,6 +139,9 @@ void JankTracker::finishFrame(const FrameInfo& frame) {
(*mGlobalData)->reportJank();
}
+ if (mSwapDeadline < 0) {
+ mSwapDeadline = frame[FrameInfoIndex::IntendedVsync] + mFrameInterval;
+ }
bool isTripleBuffered = (mSwapDeadline - frame[FrameInfoIndex::IntendedVsync]) > (mFrameInterval * 0.1);
mSwapDeadline = std::max(mSwapDeadline + mFrameInterval,
diff --git a/libs/hwui/JankTracker.h b/libs/hwui/JankTracker.h
index 4460266276f9..b3fbbfe98669 100644
--- a/libs/hwui/JankTracker.h
+++ b/libs/hwui/JankTracker.h
@@ -75,7 +75,7 @@ private:
std::array<int64_t, NUM_BUCKETS> mThresholds;
int64_t mFrameInterval;
- nsecs_t mSwapDeadline;
+ nsecs_t mSwapDeadline = -1;
// The amount of time we will erase from the total duration to account
// for SF vsync offsets with HWC2 blocking dequeueBuffers.
// (Vsync + mDequeueBlockTolerance) is the point at which we expect