diff options
author | 2023-08-10 11:45:58 -0700 | |
---|---|---|
committer | 2023-08-10 22:58:02 +0000 | |
commit | e088dcdce8ac7a947c2a2e4cd2ba6cea7a28e21c (patch) | |
tree | ae30522dd57246a56251368789c8a6402f519ffd /libs/hwui/FrameInfo.h | |
parent | afce62fb455d3790f328b3582e681c6e27e86224 (diff) |
hwui: add reason for skipped frames
.. so we could report the unintentional skipped frames to Perfetto,
rather than report undrawn frames as well.
Test: manual
Bug: 294884928
Change-Id: Ic49f4050cb3028d7adb5c930947ff6b72655d832
Diffstat (limited to 'libs/hwui/FrameInfo.h')
-rw-r--r-- | libs/hwui/FrameInfo.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libs/hwui/FrameInfo.h b/libs/hwui/FrameInfo.h index b15b6cb9a9ec..f7ad13978a30 100644 --- a/libs/hwui/FrameInfo.h +++ b/libs/hwui/FrameInfo.h @@ -16,15 +16,17 @@ #ifndef FRAMEINFO_H_ #define FRAMEINFO_H_ -#include "utils/Macros.h" - #include <cutils/compiler.h> +#include <memory.h> #include <utils/Timers.h> #include <array> -#include <memory.h> +#include <optional> #include <string> +#include "SkippedFrameInfo.h" +#include "utils/Macros.h" + namespace android { namespace uirenderer { @@ -186,8 +188,14 @@ public: return mFrameInfo[static_cast<int>(index)]; } + void setSkippedFrameReason(SkippedFrameReason reason); + inline std::optional<SkippedFrameReason> getSkippedFrameReason() const { + return mSkippedFrameReason; + } + private: int64_t mFrameInfo[static_cast<int>(FrameInfoIndex::NumIndexes)]; + std::optional<SkippedFrameReason> mSkippedFrameReason; }; } /* namespace uirenderer */ |