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

Commit 3daa5749 authored by Pablo Ceballos's avatar Pablo Ceballos
Browse files

Add the setAutoRefresh interface in ANativeWindow

Bug 24940410

Change-Id: I6c0d149c63236f169897c64b21563630fb034338
parent 23419e39
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -313,6 +313,7 @@ enum {
    NATIVE_WINDOW_SET_BUFFERS_DATASPACE     = 19,
    NATIVE_WINDOW_SET_SURFACE_DAMAGE        = 20,   /* private */
    NATIVE_WINDOW_SET_SINGLE_BUFFER_MODE    = 21,
    NATIVE_WINDOW_SET_AUTO_REFRESH          = 22,
};

/* parameter for NATIVE_WINDOW_[API_][DIS]CONNECT */
@@ -964,6 +965,17 @@ static inline int native_window_set_single_buffer_mode(
            singleBufferMode);
}

/*
 * native_window_set_auto_refresh(..., autoRefresh)
 * Enable/disable auto refresh when in single buffer mode
 */
static inline int native_window_set_auto_refresh(
        struct ANativeWindow* window,
        bool autoRefresh)
{
    return window->perform(window, NATIVE_WINDOW_SET_AUTO_REFRESH, autoRefresh);
}

__END_DECLS

#endif /* SYSTEM_CORE_INCLUDE_ANDROID_WINDOW_H */