From 7ea777f097784492f880623067becac1b276f884 Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Mon, 18 Nov 2013 16:58:36 -0800 Subject: gui: Add tests for IGraphicBufferProducer * Basic tests only. Needs more complicated queue/dequeue tests. * Also needs consumer-side tests to really be thorough. Change-Id: I1099dd56d65b6e9dfa15377726d6054ce657c0ca --- include/gui/BufferQueue.h | 2 +- include/gui/IGraphicBufferProducer.h | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'include/gui') diff --git a/include/gui/BufferQueue.h b/include/gui/BufferQueue.h index cab7e86..15dc645 100644 --- a/include/gui/BufferQueue.h +++ b/include/gui/BufferQueue.h @@ -107,7 +107,7 @@ public: // // This will fail if the producer has dequeued any buffers, or if // bufferCount is invalid. bufferCount must generally be a value - // between the minimum undequeued buffer count and NUM_BUFFER_SLOTS + // between the minimum undequeued buffer count (exclusive) and NUM_BUFFER_SLOTS // (inclusive). It may also be set to zero (the default) to indicate // that the producer does not wish to set a value. The minimum value // can be obtained by calling query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, diff --git a/include/gui/IGraphicBufferProducer.h b/include/gui/IGraphicBufferProducer.h index 461be6f..7002530 100644 --- a/include/gui/IGraphicBufferProducer.h +++ b/include/gui/IGraphicBufferProducer.h @@ -84,9 +84,13 @@ public: // This function should not be called when there are any dequeued buffer // slots, doing so will result in a BAD_VALUE error returned. // - // The buffer count should be at most NUM_BUFFER_SLOTS, but at least - // the minimum undequeued buffer count (inclusive). The minimum value - // can be obtained by calling query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS); + // The buffer count should be at most NUM_BUFFER_SLOTS (inclusive), but at least + // the minimum undequeued buffer count (exclusive). The minimum value + // can be obtained by calling query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS). + // In particular the range is (minUndequeudBuffers, NUM_BUFFER_SLOTS]. + // + // The buffer count may also be set to 0 (the default), to indicate that + // the producer does not wish to set a value. // // Return of a value other than NO_ERROR means an error has occurred: // * NO_INIT - the buffer queue has been abandoned. @@ -315,6 +319,7 @@ public: // * BAD_VALUE - one of the following has occurred: // * the producer is already connected // * api was out of range (see above). + // * output was NULL. // * DEAD_OBJECT - the token is hosted by an already-dead process // // Additional negative errors may be returned by the internals, they -- cgit v1.1