summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-09-03 22:03:08 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-03 22:03:08 +0000
commitf615872cb49062de9113c7c5be31d3b1d1b423af (patch)
treeecee3208585b102649c762042351e4d326e7770f /core
parent2f142ab0779c9e36c6f733d7e2e0be083f7172ac (diff)
parent0b887e579b766012c09626e7089a3fade5415ee6 (diff)
downloadframeworks_base-f615872cb49062de9113c7c5be31d3b1d1b423af.zip
frameworks_base-f615872cb49062de9113c7c5be31d3b1d1b423af.tar.gz
frameworks_base-f615872cb49062de9113c7c5be31d3b1d1b423af.tar.bz2
am 0b887e57: Merge "SurfaceControl: Add colorTransform to DisplayInfo" into mnc-dr-dev
* commit '0b887e579b766012c09626e7089a3fade5415ee6': SurfaceControl: Add colorTransform to DisplayInfo
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/SurfaceControl.java8
-rw-r--r--core/jni/android_view_SurfaceControl.cpp5
2 files changed, 11 insertions, 2 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index 5970c3f..bcf9b2c 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -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 + "}";
}
}
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index 77af341..20352eb 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -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");