Merge "Add the setAutoRefresh interface in ANativeWindow" into nyc-dev
This commit is contained in:
commit
f411123ea0
1 changed files with 12 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue