summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/DisplayHardware
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2014-11-04 11:37:46 -0800
committerDan Stoza <stoza@google.com>2014-11-07 10:39:13 -0800
commit8dc55396fc9bc425b5e2c82e76a38080f2a655ff (patch)
tree36dfc0172e525db15531c9074a81096862287edf /services/surfaceflinger/DisplayHardware
parent793fc0e13d25bdecda1219999f8be2cb3c121d20 (diff)
downloadframeworks_native-8dc55396fc9bc425b5e2c82e76a38080f2a655ff.zip
frameworks_native-8dc55396fc9bc425b5e2c82e76a38080f2a655ff.tar.gz
frameworks_native-8dc55396fc9bc425b5e2c82e76a38080f2a655ff.tar.bz2
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 'services/surfaceflinger/DisplayHardware')
-rw-r--r--services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp2
-rw-r--r--services/surfaceflinger/DisplayHardware/FramebufferSurface.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
index b767983..22d3cec 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
@@ -122,7 +122,7 @@ status_t FramebufferSurface::nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>&
}
// Overrides ConsumerBase::onFrameAvailable(), does not call base class impl.
-void FramebufferSurface::onFrameAvailable() {
+void FramebufferSurface::onFrameAvailable(const BufferItem& /* item */) {
sp<GraphicBuffer> buf;
sp<Fence> acquireFence;
status_t err = nextBuffer(buf, acquireFence);
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
index d0bf22b..8605862 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
@@ -56,7 +56,7 @@ public:
private:
virtual ~FramebufferSurface() { }; // this class cannot be overloaded
- virtual void onFrameAvailable();
+ virtual void onFrameAvailable(const BufferItem& item);
virtual void freeBufferLocked(int slotIndex);
virtual void dumpLocked(String8& result, const char* prefix) const;