surfaceflinger: move all SurfaceFlingerConsumer data members
Move them and related methods to the base class,
BufferLayerConsumer.
This also moves the latching of mTransformToDisplayInverse and
mSurfaceDamage from acquireBufferLocked to updateAndReleaseLocked,
where LayerRejecter might reject the buffer and return early.
Test: boots
Change-Id: Ib76e8f42a9f9dbe807ba8b335746de561dd98851
diff --git a/services/surfaceflinger/BufferLayerConsumer.h b/services/surfaceflinger/BufferLayerConsumer.h
index 0da73d1..4f8e5fa 100644
--- a/services/surfaceflinger/BufferLayerConsumer.h
+++ b/services/surfaceflinger/BufferLayerConsumer.h
@@ -25,6 +25,7 @@
#include <ui/FenceTime.h>
#include <ui/GraphicBuffer.h>
+#include <ui/Region.h>
#include <utils/String8.h>
#include <utils/Vector.h>
@@ -143,6 +144,11 @@
// the BufferQueue associated with this consumer.
uint64_t getFrameNumber();
+ bool getTransformToDisplayInverse() const;
+
+ // must be called from SF main thread
+ const Region& getSurfaceDamage() const;
+
// setDefaultBufferSize is used to set the size of buffers returned by
// requestBuffers when a with and height of zero is requested.
// A call to setDefaultBufferSize() may trigger requestBuffers() to
@@ -355,6 +361,14 @@
// It gets set each time updateTexImage is called.
uint64_t mCurrentFrameNumber;
+ // Indicates this buffer must be transformed by the inverse transform of the screen
+ // it is displayed onto. This is applied after BufferLayerConsumer::mCurrentTransform.
+ // This must be set/read from SurfaceFlinger's main thread.
+ bool mCurrentTransformToDisplayInverse;
+
+ // The portion of this surface that has changed since the previous frame
+ Region mCurrentSurfaceDamage;
+
uint32_t mDefaultWidth, mDefaultHeight;
// mFilteringEnabled indicates whether the transform matrix is computed for