diff options
author | Mathias Agopian <mathias@google.com> | 2010-10-01 16:22:41 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-10-04 20:10:11 -0700 |
commit | 19957553cbda9134f542e3374c28710d3556d1ce (patch) | |
tree | 681ecd3377ae51b37d873b5ccbbafc12445256c0 /include/ui/egl | |
parent | 566b728c933c0fe7d333d426bc420fcd363aa3d1 (diff) | |
download | frameworks_native-19957553cbda9134f542e3374c28710d3556d1ce.zip frameworks_native-19957553cbda9134f542e3374c28710d3556d1ce.tar.gz frameworks_native-19957553cbda9134f542e3374c28710d3556d1ce.tar.bz2 |
fix [2835280] Add support for cancelling buffers to ANativeWindow
There is a new ANativeWindow::cancelBuffer() API that can be used to
cancel any dequeued buffer, BEFORE it's been enqueued. The buffer is
returned to the list of availlable buffers. dequeue and cancel are not
mutually thread safe, they must be called from the same thread or
external synchronization must be used.
Change-Id: I86cc7985bace8b6a93ad2c75d2bef5c3c2cb4d61
Diffstat (limited to 'include/ui/egl')
-rw-r--r-- | include/ui/egl/android_natives.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/ui/egl/android_natives.h b/include/ui/egl/android_natives.h index d59d72b..654d0f3 100644 --- a/include/ui/egl/android_natives.h +++ b/include/ui/egl/android_natives.h @@ -218,7 +218,17 @@ struct ANativeWindow int (*perform)(struct ANativeWindow* window, int operation, ... ); - void* reserved_proc[3]; + /* + * hook used to cancel a buffer that has been dequeued. + * No synchronization is performed between dequeue() and cancel(), so + * either external synchronization is needed, or these functions must be + * called from the same thread. + */ + int (*cancelBuffer)(struct ANativeWindow* window, + struct android_native_buffer_t* buffer); + + + void* reserved_proc[2]; }; // Backwards compatibility... please switch to ANativeWindow. |