From ce54b4d14e25b651d358875a45bc1ecb2e292c56 Mon Sep 17 00:00:00 2001 From: Craig Donner Date: Wed, 19 Oct 2016 18:07:17 -0700 Subject: [PATCH] Adds ANativeWindowBuffer support for layered images. This is required for support of buffers that back texture arrays. Bug: 31686534 Test: manual Change-Id: I78ce132592f3803482ca858fd4be103c286f21e9 --- include/system/window.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/system/window.h b/include/system/window.h index f43970549..3faf2fbb2 100644 --- a/include/system/window.h +++ b/include/system/window.h @@ -121,8 +121,9 @@ typedef struct ANativeWindowBuffer int stride; int format; int usage; + uintptr_t layerCount; - void* reserved[2]; + void* reserved[1]; buffer_handle_t handle; @@ -297,6 +298,13 @@ enum { * Returns the duration of the last queueBuffer call in microseconds */ NATIVE_WINDOW_LAST_QUEUE_DURATION = 15, + + /* + * Returns the number of image layers that the ANativeWindow buffer + * contains. By default this is 1, unless a buffer is explicitly allocated + * to contain multiple layers. + */ + NATIVE_WINDOW_LAYER_COUNT = 16, }; /* Valid operations for the (*perform)() hook.