diff options
author | John Reck <jreck@google.com> | 2015-06-03 14:42:34 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2015-06-04 10:49:08 -0700 |
commit | 41300274cf8efde2ca95d3c767b214d1edb97f8d (patch) | |
tree | 8050e8f5aa281cb3ed3c8f5c325f5b994922f95c /libs/hwui/FrameInfo.h | |
parent | e50b091df9586c5c41d219ffb0c41fa3f893c329 (diff) | |
download | frameworks_base-41300274cf8efde2ca95d3c767b214d1edb97f8d.zip frameworks_base-41300274cf8efde2ca95d3c767b214d1edb97f8d.tar.gz frameworks_base-41300274cf8efde2ca95d3c767b214d1edb97f8d.tar.bz2 |
Iterate step of launch & iterate
Bug: 18052916
Tweaked colors, merged some categories
Reduced significance of fast frames
Increased visual weight of janky frames
Change-Id: I5b4e86164c4d51debad7de0e0f8715dda34c7a60
Diffstat (limited to 'libs/hwui/FrameInfo.h')
-rw-r--r-- | libs/hwui/FrameInfo.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libs/hwui/FrameInfo.h b/libs/hwui/FrameInfo.h index 6815254..23339ce 100644 --- a/libs/hwui/FrameInfo.h +++ b/libs/hwui/FrameInfo.h @@ -116,16 +116,28 @@ public: set(FrameInfoIndex::Flags) |= static_cast<uint64_t>(frameInfoFlag); } - int64_t operator[](FrameInfoIndex index) const { + inline int64_t operator[](FrameInfoIndex index) const { if (index == FrameInfoIndex::NumIndexes) return 0; return mFrameInfo[static_cast<int>(index)]; } - int64_t operator[](int index) const { + inline int64_t operator[](int index) const { if (index < 0 || index >= static_cast<int>(FrameInfoIndex::NumIndexes)) return 0; return mFrameInfo[index]; } + inline int64_t duration(FrameInfoIndex start, FrameInfoIndex end) const { + int64_t endtime = mFrameInfo[static_cast<int>(end)]; + int64_t starttime = mFrameInfo[static_cast<int>(start)]; + int64_t gap = endtime - starttime; + gap = starttime > 0 ? gap : 0; + return gap > 0 ? gap : 0; + } + + inline int64_t totalDuration() const { + return duration(FrameInfoIndex::IntendedVsync, FrameInfoIndex::FrameCompleted); + } + private: inline int64_t& set(FrameInfoIndex index) { return mFrameInfo[static_cast<int>(index)]; |