summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-02-25 16:45:08 -0800
committerDan Stoza <stoza@google.com>2015-04-28 13:42:30 -0700
commit0a866ea450d9fec88e9e15988afdf9265f021c34 (patch)
tree0c9bf80eb059907f74f3473f867c330c9d042376 /include
parentd81f75ae41b2eed4ae7b0911f250778f3e6ec9c2 (diff)
downloadsystem_core-0a866ea450d9fec88e9e15988afdf9265f021c34.zip
system_core-0a866ea450d9fec88e9e15988afdf9265f021c34.tar.gz
system_core-0a866ea450d9fec88e9e15988afdf9265f021c34.tar.bz2
ANativeWindow: Add NATIVE_WINDOW_BUFFER_AGE query
Adds a NATIVE_WINDOW_BUFFER_AGE query, which returns the age of the contents of the most recently dequeued buffer as the number of frames that have elapsed since it was last queued. Change-Id: Ib6fd62945cb62d1e60133a65beee510363218a23 (cherry picked from commit 19df32cd19b7fd940eef01b9c92a485144263495)
Diffstat (limited to 'include')
-rw-r--r--include/system/window.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/system/window.h b/include/system/window.h
index a875427..508ce00 100644
--- a/include/system/window.h
+++ b/include/system/window.h
@@ -267,7 +267,16 @@ enum {
* The default data space for the buffers as set by the consumer.
* The values are defined in graphics.h.
*/
- NATIVE_WINDOW_DEFAULT_DATASPACE = 12
+ NATIVE_WINDOW_DEFAULT_DATASPACE = 12,
+
+ /*
+ * Returns the age of the contents of the most recently dequeued buffer as
+ * the number of frames that have elapsed since it was last queued. For
+ * example, if the window is double-buffered, the age of any given buffer in
+ * steady state will be 2. If the dequeued buffer has never been queued, its
+ * age will be 0.
+ */
+ NATIVE_WINDOW_BUFFER_AGE = 13,
};
/* Valid operations for the (*perform)() hook.