summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-02-27 14:10:20 -0800
committerJamie Gennis <jgennis@google.com>2011-02-28 12:24:40 -0800
commit96dcc978430f0daf6d73fee96a01779ed537a0ce (patch)
tree683c5986dd007030e5a98e57aa6c0764d19da51b /include/ui
parent8e79442c4fdabd2f82d0ed8e23d394816edee495 (diff)
downloadframeworks_base-96dcc978430f0daf6d73fee96a01779ed537a0ce.zip
frameworks_base-96dcc978430f0daf6d73fee96a01779ed537a0ce.tar.gz
frameworks_base-96dcc978430f0daf6d73fee96a01779ed537a0ce.tar.bz2
Add the MIN_UNDEQUEUED_BUFFERS query to ANW.
This change adds a new query to ANativeWindow for getting the minimum number of buffers that must be left un-dequeued during the steady-state operation of the ANativeWindow. Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551 Related-Bug: 3356050
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/egl/android_natives.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/ui/egl/android_natives.h b/include/ui/egl/android_natives.h
index fdc8105..fd83f46 100644
--- a/include/ui/egl/android_natives.h
+++ b/include/ui/egl/android_natives.h
@@ -75,6 +75,26 @@ enum {
NATIVE_WINDOW_WIDTH = 0,
NATIVE_WINDOW_HEIGHT,
NATIVE_WINDOW_FORMAT,
+
+ /* The minimum number of buffers that must remain un-dequeued after a buffer
+ * has been queued. This value applies only if set_buffer_count was used to
+ * override the number of buffers and if a buffer has since been queued.
+ * Users of the set_buffer_count ANativeWindow method should query this
+ * value before calling set_buffer_count. If it is necessary to have N
+ * buffers simultaneously dequeued as part of the steady-state operation,
+ * and this query returns M then N+M buffers should be requested via
+ * native_window_set_buffer_count.
+ *
+ * Note that this value does NOT apply until a single buffer has been
+ * queued. In particular this means that it is possible to:
+ *
+ * 1. Query M = min undequeued buffers
+ * 2. Set the buffer count to N + M
+ * 3. Dequeue all N + M buffers
+ * 4. Cancel M buffers
+ * 5. Queue, dequeue, queue, dequeue, ad infinitum
+ */
+ NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS,
};
/* valid operations for the (*perform)() hook */