summaryrefslogtreecommitdiffstats
path: root/include/gui/Surface.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gui/Surface.h')
-rw-r--r--include/gui/Surface.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/gui/Surface.h b/include/gui/Surface.h
index a9f78cf..72f1067 100644
--- a/include/gui/Surface.h
+++ b/include/gui/Surface.h
@@ -101,6 +101,14 @@ public:
*/
void allocateBuffers();
+ /* Sets the generation number on the IGraphicBufferProducer and updates the
+ * generation number on any buffers attached to the Surface after this call.
+ * See IGBP::setGenerationNumber for more information. */
+ status_t setGenerationNumber(uint32_t generationNumber);
+
+ // See IGraphicBufferProducer::getConsumerName
+ String8 getConsumerName() const;
+
protected:
virtual ~Surface();
@@ -179,7 +187,7 @@ public:
virtual int unlockAndPost();
virtual int connect(int api, const sp<IProducerListener>& listener);
- virtual int detachNextBuffer(ANativeWindowBuffer** outBuffer,
+ virtual int detachNextBuffer(sp<GraphicBuffer>* outBuffer,
sp<Fence>* outFence);
virtual int attachBuffer(ANativeWindowBuffer*);
@@ -305,6 +313,10 @@ private:
// When a non-CPU producer is attached, this reflects the surface damage
// (the change since the previous frame) passed in by the producer.
Region mDirtyRegion;
+
+ // Stores the current generation number. See setGenerationNumber and
+ // IGraphicBufferProducer::setGenerationNumber for more information.
+ uint32_t mGenerationNumber;
};
}; // namespace android