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

Commit 3836d4c3 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "ANativeWindow_setBuffersTransform: Allow forwarding INVERSE_DISPLAY" into pi-dev

parents 7c9764f3 175ed5ba
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -113,7 +113,10 @@ int32_t ANativeWindow_setBuffersTransform(ANativeWindow* window, int32_t transfo
    constexpr int32_t kAllTransformBits =
            ANATIVEWINDOW_TRANSFORM_MIRROR_HORIZONTAL |
            ANATIVEWINDOW_TRANSFORM_MIRROR_VERTICAL |
            ANATIVEWINDOW_TRANSFORM_ROTATE_90;
            ANATIVEWINDOW_TRANSFORM_ROTATE_90 |
            // We don't expose INVERSE_DISPLAY as an NDK constant, but someone could have read it
            // from a buffer already set by Camera framework, so we allow it to be forwarded.
            NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY;
    if (!window || !query(window, NATIVE_WINDOW_IS_VALID))
        return -EINVAL;
    if ((transform & ~kAllTransformBits) != 0)