From 0884711a6034150851dd8088302eaa0df9e10281 Mon Sep 17 00:00:00 2001 From: Rachel Lee Date: Thu, 16 Feb 2023 11:07:48 -0800 Subject: 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 --- libs/gui/VsyncEventData.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/gui/VsyncEventData.cpp') 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; } -- cgit v1.2.3-59-g8ed1b