summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread/TimeLord.h
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-02-19 14:36:50 -0800
committerJohn Reck <jreck@google.com>2015-02-20 08:27:38 -0800
commitba6adf66d3c44c0aa2fd8a224862ff1901d64300 (patch)
tree8172a893f00caa283cf0386dd3d585ca8fac867c /libs/hwui/renderthread/TimeLord.h
parent004a46eb171bc86a3d40eb8fc6a4d9eed48027c7 (diff)
downloadframeworks_base-ba6adf66d3c44c0aa2fd8a224862ff1901d64300.zip
frameworks_base-ba6adf66d3c44c0aa2fd8a224862ff1901d64300.tar.gz
frameworks_base-ba6adf66d3c44c0aa2fd8a224862ff1901d64300.tar.bz2
Initial attempt at jank-tracking stat collection
Is a bit naive, perhaps overly aggressive, but sorta works Change-Id: I01a774e00dbe681439c02557d9728ae43c45ce50
Diffstat (limited to 'libs/hwui/renderthread/TimeLord.h')
-rw-r--r--libs/hwui/renderthread/TimeLord.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/TimeLord.h b/libs/hwui/renderthread/TimeLord.h
index 7c155d2..5464399 100644
--- a/libs/hwui/renderthread/TimeLord.h
+++ b/libs/hwui/renderthread/TimeLord.h
@@ -29,9 +29,13 @@ class RenderThread;
class TimeLord {
public:
void setFrameInterval(nsecs_t intervalNanos) { mFrameIntervalNanos = intervalNanos; }
+ nsecs_t frameIntervalNanos() const { return mFrameIntervalNanos; }
+
// returns true if the vsync is newer, false if it was rejected for staleness
bool vsyncReceived(nsecs_t vsync);
+ nsecs_t latestVsync() { return mFrameTimeNanos; }
nsecs_t computeFrameTimeMs();
+ nsecs_t computeFrameTimeNanos();
private:
friend class RenderThread;