summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/SurfaceFlingerConsumer.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/SurfaceFlingerConsumer.h')
-rw-r--r--services/surfaceflinger/SurfaceFlingerConsumer.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlingerConsumer.h b/services/surfaceflinger/SurfaceFlingerConsumer.h
index 28f2f6a..1aaba18 100644
--- a/services/surfaceflinger/SurfaceFlingerConsumer.h
+++ b/services/surfaceflinger/SurfaceFlingerConsumer.h
@@ -35,19 +35,19 @@ public:
SurfaceFlingerConsumer(const sp<IGraphicBufferConsumer>& consumer,
uint32_t tex)
: GLConsumer(consumer, tex, GLConsumer::TEXTURE_EXTERNAL, false, false),
- mTransformToDisplayInverse(false)
+ mTransformToDisplayInverse(false), mSurfaceDamage()
{}
class BufferRejecter {
friend class SurfaceFlingerConsumer;
virtual bool reject(const sp<GraphicBuffer>& buf,
- const IGraphicBufferConsumer::BufferItem& item) = 0;
+ const BufferItem& item) = 0;
protected:
virtual ~BufferRejecter() { }
};
- virtual status_t acquireBufferLocked(BufferQueue::BufferItem *item, nsecs_t presentWhen);
+ virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen);
// This version of updateTexImage() takes a functor that may be used to
// reject the newly acquired buffer. Unlike the GLConsumer version,
@@ -60,6 +60,7 @@ public:
// must be called from SF main thread
bool getTransformToDisplayInverse() const;
+ const Region& getSurfaceDamage() const;
// Sets the contents changed listener. This should be used instead of
// ConsumerBase::setFrameAvailableListener().
@@ -78,6 +79,9 @@ private:
// it is displayed onto. This is applied after GLConsumer::mCurrentTransform.
// This must be set/read from SurfaceFlinger's main thread.
bool mTransformToDisplayInverse;
+
+ // The portion of this surface that has changed since the previous frame
+ Region mSurfaceDamage;
};
// ----------------------------------------------------------------------------