Loading core/java/android/view/SurfaceControl.java +6 −2 Original line number Diff line number Diff line Loading @@ -484,6 +484,7 @@ public class SurfaceControl { public boolean secure; public long appVsyncOffsetNanos; public long presentationDeadlineNanos; public int colorTransform; public PhysicalDisplayInfo() { } Loading @@ -507,7 +508,8 @@ public class SurfaceControl { && yDpi == other.yDpi && secure == other.secure && appVsyncOffsetNanos == other.appVsyncOffsetNanos && presentationDeadlineNanos == other.presentationDeadlineNanos; && presentationDeadlineNanos == other.presentationDeadlineNanos && colorTransform == other.colorTransform; } @Override Loading @@ -525,6 +527,7 @@ public class SurfaceControl { secure = other.secure; appVsyncOffsetNanos = other.appVsyncOffsetNanos; presentationDeadlineNanos = other.presentationDeadlineNanos; colorTransform = other.colorTransform; } // For debugging purposes Loading @@ -533,7 +536,8 @@ public class SurfaceControl { return "PhysicalDisplayInfo{" + width + " x " + height + ", " + refreshRate + " fps, " + "density " + density + ", " + xDpi + " x " + yDpi + " dpi, secure " + secure + ", appVsyncOffset " + appVsyncOffsetNanos + ", bufferDeadline " + presentationDeadlineNanos + "}"; + ", bufferDeadline " + presentationDeadlineNanos + ", colorTransform " + colorTransform + "}"; } } Loading core/jni/android_view_SurfaceControl.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ static struct { jfieldID secure; jfieldID appVsyncOffsetNanos; jfieldID presentationDeadlineNanos; jfieldID colorTransform; } gPhysicalDisplayInfoClassInfo; static struct { Loading Loading @@ -394,6 +395,8 @@ static jobjectArray nativeGetDisplayConfigs(JNIEnv* env, jclass clazz, info.appVsyncOffset); env->SetLongField(infoObj, gPhysicalDisplayInfoClassInfo.presentationDeadlineNanos, info.presentationDeadline); env->SetIntField(infoObj, gPhysicalDisplayInfoClassInfo.colorTransform, info.colorTransform); env->SetObjectArrayElement(configArray, static_cast<jsize>(c), infoObj); env->DeleteLocalRef(infoObj); } Loading Loading @@ -656,6 +659,8 @@ int register_android_view_SurfaceControl(JNIEnv* env) clazz, "appVsyncOffsetNanos", "J"); gPhysicalDisplayInfoClassInfo.presentationDeadlineNanos = GetFieldIDOrDie(env, clazz, "presentationDeadlineNanos", "J"); gPhysicalDisplayInfoClassInfo.colorTransform = GetFieldIDOrDie(env, clazz, "colorTransform", "I"); jclass rectClazz = FindClassOrDie(env, "android/graphics/Rect"); gRectClassInfo.bottom = GetFieldIDOrDie(env, rectClazz, "bottom", "I"); Loading Loading
core/java/android/view/SurfaceControl.java +6 −2 Original line number Diff line number Diff line Loading @@ -484,6 +484,7 @@ public class SurfaceControl { public boolean secure; public long appVsyncOffsetNanos; public long presentationDeadlineNanos; public int colorTransform; public PhysicalDisplayInfo() { } Loading @@ -507,7 +508,8 @@ public class SurfaceControl { && yDpi == other.yDpi && secure == other.secure && appVsyncOffsetNanos == other.appVsyncOffsetNanos && presentationDeadlineNanos == other.presentationDeadlineNanos; && presentationDeadlineNanos == other.presentationDeadlineNanos && colorTransform == other.colorTransform; } @Override Loading @@ -525,6 +527,7 @@ public class SurfaceControl { secure = other.secure; appVsyncOffsetNanos = other.appVsyncOffsetNanos; presentationDeadlineNanos = other.presentationDeadlineNanos; colorTransform = other.colorTransform; } // For debugging purposes Loading @@ -533,7 +536,8 @@ public class SurfaceControl { return "PhysicalDisplayInfo{" + width + " x " + height + ", " + refreshRate + " fps, " + "density " + density + ", " + xDpi + " x " + yDpi + " dpi, secure " + secure + ", appVsyncOffset " + appVsyncOffsetNanos + ", bufferDeadline " + presentationDeadlineNanos + "}"; + ", bufferDeadline " + presentationDeadlineNanos + ", colorTransform " + colorTransform + "}"; } } Loading
core/jni/android_view_SurfaceControl.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ static struct { jfieldID secure; jfieldID appVsyncOffsetNanos; jfieldID presentationDeadlineNanos; jfieldID colorTransform; } gPhysicalDisplayInfoClassInfo; static struct { Loading Loading @@ -394,6 +395,8 @@ static jobjectArray nativeGetDisplayConfigs(JNIEnv* env, jclass clazz, info.appVsyncOffset); env->SetLongField(infoObj, gPhysicalDisplayInfoClassInfo.presentationDeadlineNanos, info.presentationDeadline); env->SetIntField(infoObj, gPhysicalDisplayInfoClassInfo.colorTransform, info.colorTransform); env->SetObjectArrayElement(configArray, static_cast<jsize>(c), infoObj); env->DeleteLocalRef(infoObj); } Loading Loading @@ -656,6 +659,8 @@ int register_android_view_SurfaceControl(JNIEnv* env) clazz, "appVsyncOffsetNanos", "J"); gPhysicalDisplayInfoClassInfo.presentationDeadlineNanos = GetFieldIDOrDie(env, clazz, "presentationDeadlineNanos", "J"); gPhysicalDisplayInfoClassInfo.colorTransform = GetFieldIDOrDie(env, clazz, "colorTransform", "I"); jclass rectClazz = FindClassOrDie(env, "android/graphics/Rect"); gRectClassInfo.bottom = GetFieldIDOrDie(env, rectClazz, "bottom", "I"); Loading