summaryrefslogtreecommitdiffstats
path: root/include/system
diff options
context:
space:
mode:
authorPablo Ceballos <pceballos@google.com>2016-02-20 18:22:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-02-20 18:22:29 +0000
commitf411123ea06da276f435cfd27d824d11b2aebbfe (patch)
treed19b2172a3f2f2c04f433d22b396162b8800a542 /include/system
parenta9061ece0519755808e84909ad3747462c1fe666 (diff)
parent3daa57490e914911bdc6f107efc8d1653cc53d7f (diff)
downloadcore-f411123ea06da276f435cfd27d824d11b2aebbfe.tar.gz
core-f411123ea06da276f435cfd27d824d11b2aebbfe.tar.bz2
core-f411123ea06da276f435cfd27d824d11b2aebbfe.zip
Merge "Add the setAutoRefresh interface in ANativeWindow" into nyc-dev
Diffstat (limited to 'include/system')
-rw-r--r--include/system/window.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/system/window.h b/include/system/window.h
index 14cce27bf..1ca093f62 100644
--- a/include/system/window.h
+++ b/include/system/window.h
@@ -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 */