Rename const to kFrameTimelinesCapacity.

Bug: 270612751
Test: build
Change-Id: Ia7f295974c3869f092d53425175cd7678c35f770
This commit is contained in:
Rachel Lee
2023-04-26 10:15:23 -07:00
parent 2e687e329c
commit 17fc860fc9
2 changed files with 6 additions and 7 deletions

View File

@@ -1116,7 +1116,7 @@ public final class Choreographer {
private boolean mInCallback = false;
FrameData() {
allocateFrameTimelines(DisplayEventReceiver.VsyncEventData.FRAME_TIMELINES_LENGTH);
allocateFrameTimelines(DisplayEventReceiver.VsyncEventData.FRAME_TIMELINES_CAPACITY);
}
/** The time in nanoseconds when the frame started being rendered. */

View File

@@ -152,11 +152,10 @@ public abstract class DisplayEventReceiver {
* @hide
*/
public static final class VsyncEventData {
// The amount of frame timeline choices.
// Must be in sync with VsyncEventData::kFrameTimelinesLength in
// frameworks/native/libs/gui/include/gui/VsyncEventData.h. If they do not match, a runtime
// assertion is thrown when Choreographer is processing VsyncEventData.
static final int FRAME_TIMELINES_LENGTH = 7;
// The max capacity of frame timeline choices.
// Must be in sync with VsyncEventData::kFrameTimelinesCapacity in
// frameworks/native/libs/gui/include/gui/VsyncEventData.h
static final int FRAME_TIMELINES_CAPACITY = 7;
public static class FrameTimeline {
FrameTimeline() {}
@@ -201,7 +200,7 @@ public abstract class DisplayEventReceiver {
public int frameTimelinesLength = 0;
VsyncEventData() {
frameTimelines = new FrameTimeline[FRAME_TIMELINES_LENGTH];
frameTimelines = new FrameTimeline[FRAME_TIMELINES_CAPACITY];
for (int i = 0; i < frameTimelines.length; i++) {
frameTimelines[i] = new FrameTimeline();
}