From bc2df65a3f3f4b8abaaaa2a4e576a3a42c2d30f3 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Thu, 21 Jul 2016 17:06:58 -0700 Subject: BufferQueue consumers: Add discardFreeBuffer method This method releases all free buffers owned by the buffer queue, in order to save memory (at the cost of potential future reallocation of buffers). Bug: 28695173 Change-Id: I458d10373e639e3144faf673af2ba01aca36e65a --- include/gui/ConsumerBase.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/gui/ConsumerBase.h') diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h index d1f4cdd7d0..0490c3cc5b 100644 --- a/include/gui/ConsumerBase.h +++ b/include/gui/ConsumerBase.h @@ -89,6 +89,9 @@ public: status_t getOccupancyHistory(bool forceFlush, std::vector* outHistory); + // See IGraphicBufferConsumer::discardFreeBuffers + status_t discardFreeBuffers(); + private: ConsumerBase(const ConsumerBase&); void operator=(const ConsumerBase&); -- cgit v1.2.3-59-g8ed1b