Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27668c75 authored by Emilian Peev's avatar Emilian Peev Committed by android-build-merger
Browse files

Merge "ImageReader: Set inverse diplay transform if needed" into pi-dev am: 9504cd35

am: 9f6920c4

Change-Id: I9ce2084f66bdc10176baeb1213d0b0215cc2bf6b
parents d11ca759 9f6920c4
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -612,8 +612,12 @@ static jint ImageReader_imageSetup(JNIEnv* env, jobject thiz, jobject image) {
    Image_setBufferItem(env, image, buffer);
    Image_setBufferItem(env, image, buffer);
    env->SetLongField(image, gSurfaceImageClassInfo.mTimestamp,
    env->SetLongField(image, gSurfaceImageClassInfo.mTimestamp,
            static_cast<jlong>(buffer->mTimestamp));
            static_cast<jlong>(buffer->mTimestamp));
    auto transform = buffer->mTransform;
    if (buffer->mTransformToDisplayInverse) {
        transform |= NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY;
    }
    env->SetIntField(image, gSurfaceImageClassInfo.mTransform,
    env->SetIntField(image, gSurfaceImageClassInfo.mTransform,
            static_cast<jint>(buffer->mTransform));
            static_cast<jint>(transform));
    env->SetIntField(image, gSurfaceImageClassInfo.mScalingMode,
    env->SetIntField(image, gSurfaceImageClassInfo.mScalingMode,
            static_cast<jint>(buffer->mScalingMode));
            static_cast<jint>(buffer->mScalingMode));