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

Commit 9504cd35 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

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