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

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

Merge "Add ANativeWindow_getBuffersDefaultDataSpace()"

parents 285cd414 78d7fb36
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -193,6 +193,13 @@ int32_t ANativeWindow_getBuffersDataSpace(ANativeWindow* window) {
    return query(window, NATIVE_WINDOW_DATASPACE);
}

int32_t ANativeWindow_getBuffersDefaultDataSpace(ANativeWindow* window) {
    if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) {
        return -EINVAL;
    }
    return query(window, NATIVE_WINDOW_DEFAULT_DATASPACE);
}

int32_t ANativeWindow_setFrameRate(ANativeWindow* window, float frameRate, int8_t compatibility) {
    return ANativeWindow_setFrameRateWithChangeStrategy(window, frameRate, compatibility,
        ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS);
+10 −0
Original line number Diff line number Diff line
@@ -227,6 +227,16 @@ int32_t ANativeWindow_setBuffersDataSpace(ANativeWindow* window, int32_t dataSpa
 */
int32_t ANativeWindow_getBuffersDataSpace(ANativeWindow* window) __INTRODUCED_IN(28);

/**
 * Get the default dataspace of the buffers in window as set by the consumer.
 *
 * Available since API level 34.
 *
 * \return the dataspace of buffers in window, ADATASPACE_UNKNOWN is returned if
 * dataspace is unknown, or -EINVAL if window is invalid.
 */
int32_t ANativeWindow_getBuffersDefaultDataSpace(ANativeWindow* window) __INTRODUCED_IN(34);

/** Compatibility value for ANativeWindow_setFrameRate. */
enum ANativeWindow_FrameRateCompatibility {
    /**
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ LIBNATIVEWINDOW {
    ANativeWindow_cancelBuffer; # llndk
    ANativeWindow_dequeueBuffer; # llndk
    ANativeWindow_getBuffersDataSpace; # introduced=28
    ANativeWindow_getBuffersDefaultDataSpace; # introduced=34
    ANativeWindow_getFormat;
    ANativeWindow_getHeight;
    ANativeWindow_getLastDequeueDuration; # apex # introduced=30