summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-10-09 11:14:30 -0700
committerXin Li <delphij@google.com>2020-10-10 20:38:57 -0700
commit986e6eeddf02959975e63a7cd138e70784540bf6 (patch)
treebf060846893c657436f9429650f2240f048dd0be /libs
parent1015bae311220fe8242c33e58e11a932ed6f8a3a (diff)
parent539d92beb7ed3638107c6d90c2f6a2e8a891256d (diff)
Merge ab/6749736 in stage.
Bug: 167233921 Merged-In: Iecef31f7bf10ad97b7e0075cf302ae94e248474a Change-Id: I9e9c873bc2e05a0cfe3af0bf74725500f3f108db
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/JankTracker.cpp3
-rw-r--r--libs/hwui/JankTracker.h2
-rw-r--r--libs/hwui/service/GraphicsStatsService.cpp1
3 files changed, 5 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
diff --git a/libs/hwui/service/GraphicsStatsService.cpp b/libs/hwui/service/GraphicsStatsService.cpp
index 644d5fbd5bf9..e4198017aee0 100644
--- a/libs/hwui/service/GraphicsStatsService.cpp
+++ b/libs/hwui/service/GraphicsStatsService.cpp
@@ -559,6 +559,7 @@ void GraphicsStatsService::finishDumpInMemory(Dump* dump, AStatsEventList* data,
AStatsEvent_writeBool(event, !lastFullDay);
AStatsEvent_build(event);
}
+ delete dump;
}