summaryrefslogtreecommitdiff
path: root/include/gui/ConsumerBase.h
diff options
context:
space:
mode:
author Dan Stoza <stoza@google.com> 2014-11-04 11:37:46 -0800
committer Dan Stoza <stoza@google.com> 2014-11-07 10:39:13 -0800
commit8dc55396fc9bc425b5e2c82e76a38080f2a655ff (patch)
tree36dfc0172e525db15531c9074a81096862287edf /include/gui/ConsumerBase.h
parent793fc0e13d25bdecda1219999f8be2cb3c121d20 (diff)
Add a BufferItem parameter to onFrameAvailable
Passes the BufferItem for the queued buffer to the onFrameAvailable callback so the consumer can track the BufferQueue's contents. Also adds an onFrameReplaced callback, which is necessary if the consumer wants to do anything more than simple queue length tracking. Bug: 18111837 Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
Diffstat (limited to 'include/gui/ConsumerBase.h')
-rw-r--r--include/gui/ConsumerBase.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h
index 100bb260f9..f7ab5ac59b 100644
--- a/include/gui/ConsumerBase.h
+++ b/include/gui/ConsumerBase.h
@@ -46,7 +46,7 @@ public:
//
// This is called without any lock held and can be called concurrently
// by multiple threads.
- virtual void onFrameAvailable() = 0;
+ virtual void onFrameAvailable(const BufferItem& item) = 0;
};
virtual ~ConsumerBase();
@@ -106,7 +106,7 @@ protected:
// the ConsumerBase implementation must be called from the derived class.
// The ConsumerBase version of onSidebandStreamChanged does nothing and can
// be overriden by derived classes if they want the notification.
- virtual void onFrameAvailable();
+ virtual void onFrameAvailable(const BufferItem& item);
virtual void onBuffersReleased();
virtual void onSidebandStreamChanged();