summaryrefslogtreecommitdiffstats
path: root/include/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-10-01 16:22:41 -0700
committerMathias Agopian <mathias@google.com>2010-10-04 20:10:11 -0700
commit8ddd2c72ee7dd6f45e5375a197774b8671b982b7 (patch)
treeb3a346d011b76c96b986f831036ff95652f067cf /include/surfaceflinger
parent19058877df9bf94f197a72855f810f7f6bf8d068 (diff)
downloadframeworks_base-8ddd2c72ee7dd6f45e5375a197774b8671b982b7.zip
frameworks_base-8ddd2c72ee7dd6f45e5375a197774b8671b982b7.tar.gz
frameworks_base-8ddd2c72ee7dd6f45e5375a197774b8671b982b7.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/surfaceflinger')
-rw-r--r--include/surfaceflinger/Surface.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h
index 7c5a39b..22684db 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/surfaceflinger/Surface.h
@@ -199,6 +199,7 @@ private:
*/
static int setSwapInterval(ANativeWindow* window, int interval);
static int dequeueBuffer(ANativeWindow* window, android_native_buffer_t** buffer);
+ static int cancelBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
static int lockBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
static int queueBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
static int query(ANativeWindow* window, int what, int* value);
@@ -207,6 +208,7 @@ private:
int dequeueBuffer(android_native_buffer_t** buffer);
int lockBuffer(android_native_buffer_t* buffer);
int queueBuffer(android_native_buffer_t* buffer);
+ int cancelBuffer(android_native_buffer_t* buffer);
int query(int what, int* value);
int perform(int operation, va_list args);