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

Commit 0e5ed706 authored by Michael I. Gold's avatar Michael I. Gold Committed by Jamie Gennis
Browse files

ANativeWindow: support for application buffer dimensions

Make the NDK use the new native_window_set_buffers_user_dimensions to implement
the ANativeWindow_setBuffersGeometry call.

Change-Id: I2d5981cbd619ee2e090fe8f2ddc69217915c9d9e
parent 54ae1474
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -60,7 +60,9 @@ int32_t ANativeWindow_getFormat(ANativeWindow* window) {

int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width,
        int32_t height, int32_t format) {
    int32_t err = native_window_set_buffers_geometry(window, width, height, format);
    int32_t err = native_window_set_buffers_format(window, format);
    if (!err) {
        err = native_window_set_buffers_user_dimensions(window, width, height);
        if (!err) {
            int mode = NATIVE_WINDOW_SCALING_MODE_FREEZE;
            if (width && height) {
@@ -68,6 +70,7 @@ int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width,
            }
            err = native_window_set_scaling_mode(window, mode);
         }
    }
    return err;
}