Loading core/java/android/view/SurfaceControl.java +10 −2 Original line number Diff line number Diff line Loading @@ -1790,7 +1790,12 @@ public final class SurfaceControl implements Parcelable { public float xDpi; public float yDpi; // Some modes have peak refresh rate lower than the panel vsync rate. public float refreshRate; // Fixed rate of vsync deadlines for the panel. // This can be higher then the peak refresh rate for some panel technologies // See: VrrConfig.aidl public float vsyncRate; public long appVsyncOffsetNanos; public long presentationDeadlineNanos; public int[] supportedHdrTypes; Loading @@ -1811,6 +1816,7 @@ public final class SurfaceControl implements Parcelable { + ", xDpi=" + xDpi + ", yDpi=" + yDpi + ", refreshRate=" + refreshRate + ", vsyncRate=" + vsyncRate + ", appVsyncOffsetNanos=" + appVsyncOffsetNanos + ", presentationDeadlineNanos=" + presentationDeadlineNanos + ", supportedHdrTypes=" + Arrays.toString(supportedHdrTypes) Loading @@ -1828,6 +1834,7 @@ public final class SurfaceControl implements Parcelable { && Float.compare(that.xDpi, xDpi) == 0 && Float.compare(that.yDpi, yDpi) == 0 && Float.compare(that.refreshRate, refreshRate) == 0 && Float.compare(that.vsyncRate, vsyncRate) == 0 && appVsyncOffsetNanos == that.appVsyncOffsetNanos && presentationDeadlineNanos == that.presentationDeadlineNanos && Arrays.equals(supportedHdrTypes, that.supportedHdrTypes) Loading @@ -1836,8 +1843,9 @@ public final class SurfaceControl implements Parcelable { @Override public int hashCode() { return Objects.hash(id, width, height, xDpi, yDpi, refreshRate, appVsyncOffsetNanos, presentationDeadlineNanos, group, Arrays.hashCode(supportedHdrTypes)); return Objects.hash(id, width, height, xDpi, yDpi, refreshRate, vsyncRate, appVsyncOffsetNanos, presentationDeadlineNanos, group, Arrays.hashCode(supportedHdrTypes)); } } Loading core/jni/android_view_SurfaceControl.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ static struct { jfieldID xDpi; jfieldID yDpi; jfieldID refreshRate; jfieldID vsyncRate; jfieldID appVsyncOffsetNanos; jfieldID presentationDeadlineNanos; jfieldID group; Loading Loading @@ -1231,6 +1232,7 @@ static jobject convertDisplayModeToJavaObject(JNIEnv* env, const ui::DisplayMode env->SetFloatField(object, gDisplayModeClassInfo.yDpi, config.yDpi); env->SetFloatField(object, gDisplayModeClassInfo.refreshRate, config.refreshRate); env->SetFloatField(object, gDisplayModeClassInfo.vsyncRate, config.vsyncRate); env->SetLongField(object, gDisplayModeClassInfo.appVsyncOffsetNanos, config.appVsyncOffset); env->SetLongField(object, gDisplayModeClassInfo.presentationDeadlineNanos, config.presentationDeadline); Loading Loading @@ -2394,6 +2396,7 @@ int register_android_view_SurfaceControl(JNIEnv* env) gDisplayModeClassInfo.xDpi = GetFieldIDOrDie(env, modeClazz, "xDpi", "F"); gDisplayModeClassInfo.yDpi = GetFieldIDOrDie(env, modeClazz, "yDpi", "F"); gDisplayModeClassInfo.refreshRate = GetFieldIDOrDie(env, modeClazz, "refreshRate", "F"); gDisplayModeClassInfo.vsyncRate = GetFieldIDOrDie(env, modeClazz, "vsyncRate", "F"); gDisplayModeClassInfo.appVsyncOffsetNanos = GetFieldIDOrDie(env, modeClazz, "appVsyncOffsetNanos", "J"); gDisplayModeClassInfo.presentationDeadlineNanos = Loading Loading
core/java/android/view/SurfaceControl.java +10 −2 Original line number Diff line number Diff line Loading @@ -1790,7 +1790,12 @@ public final class SurfaceControl implements Parcelable { public float xDpi; public float yDpi; // Some modes have peak refresh rate lower than the panel vsync rate. public float refreshRate; // Fixed rate of vsync deadlines for the panel. // This can be higher then the peak refresh rate for some panel technologies // See: VrrConfig.aidl public float vsyncRate; public long appVsyncOffsetNanos; public long presentationDeadlineNanos; public int[] supportedHdrTypes; Loading @@ -1811,6 +1816,7 @@ public final class SurfaceControl implements Parcelable { + ", xDpi=" + xDpi + ", yDpi=" + yDpi + ", refreshRate=" + refreshRate + ", vsyncRate=" + vsyncRate + ", appVsyncOffsetNanos=" + appVsyncOffsetNanos + ", presentationDeadlineNanos=" + presentationDeadlineNanos + ", supportedHdrTypes=" + Arrays.toString(supportedHdrTypes) Loading @@ -1828,6 +1834,7 @@ public final class SurfaceControl implements Parcelable { && Float.compare(that.xDpi, xDpi) == 0 && Float.compare(that.yDpi, yDpi) == 0 && Float.compare(that.refreshRate, refreshRate) == 0 && Float.compare(that.vsyncRate, vsyncRate) == 0 && appVsyncOffsetNanos == that.appVsyncOffsetNanos && presentationDeadlineNanos == that.presentationDeadlineNanos && Arrays.equals(supportedHdrTypes, that.supportedHdrTypes) Loading @@ -1836,8 +1843,9 @@ public final class SurfaceControl implements Parcelable { @Override public int hashCode() { return Objects.hash(id, width, height, xDpi, yDpi, refreshRate, appVsyncOffsetNanos, presentationDeadlineNanos, group, Arrays.hashCode(supportedHdrTypes)); return Objects.hash(id, width, height, xDpi, yDpi, refreshRate, vsyncRate, appVsyncOffsetNanos, presentationDeadlineNanos, group, Arrays.hashCode(supportedHdrTypes)); } } Loading
core/jni/android_view_SurfaceControl.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ static struct { jfieldID xDpi; jfieldID yDpi; jfieldID refreshRate; jfieldID vsyncRate; jfieldID appVsyncOffsetNanos; jfieldID presentationDeadlineNanos; jfieldID group; Loading Loading @@ -1231,6 +1232,7 @@ static jobject convertDisplayModeToJavaObject(JNIEnv* env, const ui::DisplayMode env->SetFloatField(object, gDisplayModeClassInfo.yDpi, config.yDpi); env->SetFloatField(object, gDisplayModeClassInfo.refreshRate, config.refreshRate); env->SetFloatField(object, gDisplayModeClassInfo.vsyncRate, config.vsyncRate); env->SetLongField(object, gDisplayModeClassInfo.appVsyncOffsetNanos, config.appVsyncOffset); env->SetLongField(object, gDisplayModeClassInfo.presentationDeadlineNanos, config.presentationDeadline); Loading Loading @@ -2394,6 +2396,7 @@ int register_android_view_SurfaceControl(JNIEnv* env) gDisplayModeClassInfo.xDpi = GetFieldIDOrDie(env, modeClazz, "xDpi", "F"); gDisplayModeClassInfo.yDpi = GetFieldIDOrDie(env, modeClazz, "yDpi", "F"); gDisplayModeClassInfo.refreshRate = GetFieldIDOrDie(env, modeClazz, "refreshRate", "F"); gDisplayModeClassInfo.vsyncRate = GetFieldIDOrDie(env, modeClazz, "vsyncRate", "F"); gDisplayModeClassInfo.appVsyncOffsetNanos = GetFieldIDOrDie(env, modeClazz, "appVsyncOffsetNanos", "J"); gDisplayModeClassInfo.presentationDeadlineNanos = Loading