summaryrefslogtreecommitdiff
path: root/libs/hwui/JankTracker.h
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2016-07-29 10:08:16 -0700
committerJohn Reck <jreck@google.com>2016-07-29 10:08:16 -0700
commitfb5c675b7e1fee074f19cf1866b5dda0785dbe64 (patch)
tree54c983e39ad8a3ee94062b8c509054ba87c9c81d /libs/hwui/JankTracker.h
parent942ad98481be73e1f4efe0e6837d8930ec4d9d6b (diff)
parent67daab6a1e0897cd0528a19071eeb9f4a2b00b49 (diff)
resolve merge conflicts of 67daab6 to nyc-mr1-dev-plus-aosp
Change-Id: I35f867b8d6408a7eae9cf5643f0908259de90cb1
Diffstat (limited to 'libs/hwui/JankTracker.h')
-rw-r--r--libs/hwui/JankTracker.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/hwui/JankTracker.h b/libs/hwui/JankTracker.h
index a23dd7807169..8b482d5a804d 100644
--- a/libs/hwui/JankTracker.h
+++ b/libs/hwui/JankTracker.h
@@ -21,6 +21,7 @@
#include "utils/RingBuffer.h"
#include <cutils/compiler.h>
+#include <ui/DisplayInfo.h>
#include <array>
#include <memory>
@@ -56,7 +57,7 @@ struct ProfileData {
// TODO: Replace DrawProfiler with this
class JankTracker {
public:
- explicit JankTracker(nsecs_t frameIntervalNanos);
+ explicit JankTracker(const DisplayInfo& displayInfo);
~JankTracker();
void addFrame(const FrameInfo& frame);
@@ -79,6 +80,14 @@ private:
std::array<int64_t, NUM_BUCKETS> mThresholds;
int64_t mFrameInterval;
+ // 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
+ // SF to have released the buffer normally, so we will forgive up to that
+ // point in time by comparing to (IssueDrawCommandsStart + DequeueDuration)
+ // This is only used if we are in pipelined mode and are using HWC2,
+ // otherwise it's 0.
+ nsecs_t mDequeueTimeForgiveness = 0;
ProfileData* mData;
bool mIsMapped = false;
};