summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/system/window.h42
1 files changed, 30 insertions, 12 deletions
diff --git a/include/system/window.h b/include/system/window.h
index 959bd23f4..1cc4a0a18 100644
--- a/include/system/window.h
+++ b/include/system/window.h
@@ -340,9 +340,15 @@ struct ANativeWindow
340 int interval); 340 int interval);
341 341
342 /* 342 /*
343 * hook called by EGL to acquire a buffer. After this call, the buffer 343 * Hook called by EGL to acquire a buffer. After this call, the buffer
344 * is not locked, so its content cannot be modified. 344 * is not locked, so its content cannot be modified. This call may block if
345 * this call may block if no buffers are available. 345 * no buffers are available.
346 *
347 * The window holds a reference to the buffer between dequeueBuffer and
348 * either queueBuffer or cancelBuffer, so clients only need their own
349 * reference if they might use the buffer after queueing or canceling it.
350 * Holding a reference to a buffer after queueing or canceling it is only
351 * allowed if a specific buffer count has been set.
346 * 352 *
347 * Returns 0 on success or -errno on error. 353 * Returns 0 on success or -errno on error.
348 */ 354 */
@@ -358,14 +364,20 @@ struct ANativeWindow
358 */ 364 */
359 int (*lockBuffer)(struct ANativeWindow* window, 365 int (*lockBuffer)(struct ANativeWindow* window,
360 struct ANativeWindowBuffer* buffer); 366 struct ANativeWindowBuffer* buffer);
361 /* 367 /*
362 * hook called by EGL when modifications to the render buffer are done. 368 * Hook called by EGL when modifications to the render buffer are done.
363 * This unlocks and post the buffer. 369 * This unlocks and post the buffer.
364 * 370 *
365 * Buffers MUST be queued in the same order than they were dequeued. 371 * The window holds a reference to the buffer between dequeueBuffer and
366 * 372 * either queueBuffer or cancelBuffer, so clients only need their own
367 * Returns 0 on success or -errno on error. 373 * reference if they might use the buffer after queueing or canceling it.
368 */ 374 * Holding a reference to a buffer after queueing or canceling it is only
375 * allowed if a specific buffer count has been set.
376 *
377 * Buffers MUST be queued in the same order than they were dequeued.
378 *
379 * Returns 0 on success or -errno on error.
380 */
369 int (*queueBuffer)(struct ANativeWindow* window, 381 int (*queueBuffer)(struct ANativeWindow* window,
370 struct ANativeWindowBuffer* buffer); 382 struct ANativeWindowBuffer* buffer);
371 383
@@ -411,10 +423,16 @@ struct ANativeWindow
411 int operation, ... ); 423 int operation, ... );
412 424
413 /* 425 /*
414 * hook used to cancel a buffer that has been dequeued. 426 * Hook used to cancel a buffer that has been dequeued.
415 * No synchronization is performed between dequeue() and cancel(), so 427 * No synchronization is performed between dequeue() and cancel(), so
416 * either external synchronization is needed, or these functions must be 428 * either external synchronization is needed, or these functions must be
417 * called from the same thread. 429 * called from the same thread.
430 *
431 * The window holds a reference to the buffer between dequeueBuffer and
432 * either queueBuffer or cancelBuffer, so clients only need their own
433 * reference if they might use the buffer after queueing or canceling it.
434 * Holding a reference to a buffer after queueing or canceling it is only
435 * allowed if a specific buffer count has been set.
418 */ 436 */
419 int (*cancelBuffer)(struct ANativeWindow* window, 437 int (*cancelBuffer)(struct ANativeWindow* window,
420 struct ANativeWindowBuffer* buffer); 438 struct ANativeWindowBuffer* buffer);