summaryrefslogtreecommitdiff
path: root/libs/gui/VsyncEventData.cpp
diff options
context:
space:
mode:
author Rachel Lee <rnlee@google.com> 2023-02-16 11:07:48 -0800
committer Rachel Lee <rnlee@google.com> 2023-02-21 20:51:10 -0800
commit0884711a6034150851dd8088302eaa0df9e10281 (patch)
treec7dbd2aeec05459738c5e8b36242db9cb9a868b0 /libs/gui/VsyncEventData.cpp
parent0311fdd6d2d5eca00e84bd95b1d1a296171ca038 (diff)
Assert kFrameTimelinesLength for sync.
Want to keep the value in sync with java definition. Test: change kFrameTimelinesLength and m to observe assert Bug: 258694738 Change-Id: Id6f53a809015ded83fc15fa8a99c11573559e3b0
Diffstat (limited to 'libs/gui/VsyncEventData.cpp')
-rw-r--r--libs/gui/VsyncEventData.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/gui/VsyncEventData.cpp b/libs/gui/VsyncEventData.cpp
index 23f0921e99..76c60c23c4 100644
--- a/libs/gui/VsyncEventData.cpp
+++ b/libs/gui/VsyncEventData.cpp
@@ -23,6 +23,9 @@
namespace android::gui {
+static_assert(VsyncEventData::kFrameTimelinesLength == 7,
+ "Must update value in DisplayEventReceiver.java#FRAME_TIMELINES_LENGTH (and here)");
+
int64_t VsyncEventData::preferredVsyncId() const {
return frameTimelines[preferredFrameTimelineIndex].vsyncId;
}