am 0b887e57: Merge "SurfaceControl: Add colorTransform to DisplayInfo" into mnc-dr-dev
* commit '0b887e579b766012c09626e7089a3fade5415ee6': SurfaceControl: Add colorTransform to DisplayInfo
This commit is contained in:
@@ -484,6 +484,7 @@ public class SurfaceControl {
|
||||
public boolean secure;
|
||||
public long appVsyncOffsetNanos;
|
||||
public long presentationDeadlineNanos;
|
||||
public int colorTransform;
|
||||
|
||||
public PhysicalDisplayInfo() {
|
||||
}
|
||||
@@ -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
|
||||
@@ -525,6 +527,7 @@ public class SurfaceControl {
|
||||
secure = other.secure;
|
||||
appVsyncOffsetNanos = other.appVsyncOffsetNanos;
|
||||
presentationDeadlineNanos = other.presentationDeadlineNanos;
|
||||
colorTransform = other.colorTransform;
|
||||
}
|
||||
|
||||
// For debugging purposes
|
||||
@@ -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 + "}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ static struct {
|
||||
jfieldID secure;
|
||||
jfieldID appVsyncOffsetNanos;
|
||||
jfieldID presentationDeadlineNanos;
|
||||
jfieldID colorTransform;
|
||||
} gPhysicalDisplayInfoClassInfo;
|
||||
|
||||
static struct {
|
||||
@@ -401,6 +402,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);
|
||||
}
|
||||
@@ -663,6 +666,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");
|
||||
|
||||
Reference in New Issue
Block a user