summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-09-03 21:55:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-09-03 21:55:36 +0000
commit0b887e579b766012c09626e7089a3fade5415ee6 (patch)
tree08d4fb348485145df5cdd7bb529cc84d4f634acc /core/jni
parent8a670f1da434c4720b08dbb62c635316e593b9b3 (diff)
parent904f485bc6013060e81b627be61314b3d7fe5ef8 (diff)
downloadframeworks_base-0b887e579b766012c09626e7089a3fade5415ee6.zip
frameworks_base-0b887e579b766012c09626e7089a3fade5415ee6.tar.gz
frameworks_base-0b887e579b766012c09626e7089a3fade5415ee6.tar.bz2
Merge "SurfaceControl: Add colorTransform to DisplayInfo" into mnc-dr-dev
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_view_SurfaceControl.cpp5
1 files changed, 5 insertions, 0 deletions
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");