blast: Append "_legacy" to old buffer state values
As we move from BufferQueueLayer to BufferStateLayer, some
layer state fields are used by both layer types and some
are used exclusively by one type of layer. Append "_legacy"
to all fields that are NOT used by BufferStateLayer.
Bug: 80477568
Test: Transaction_test.cpp
Change-Id: Id8bf27f5b68c00592136e4336442a5d388f35779
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 94f086c..96ec84b 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -111,8 +111,8 @@
};
struct State {
- Geometry active;
- Geometry requested;
+ Geometry active_legacy;
+ Geometry requested_legacy;
int32_t z;
// The identifier of the layer stack this layer belongs to. A layer can
@@ -128,23 +128,23 @@
bool modified;
// Crop is expressed in layer space coordinate.
- Rect crop;
- Rect requestedCrop;
+ Rect crop_legacy;
+ Rect requestedCrop_legacy;
// finalCrop is expressed in display space coordinate.
- Rect finalCrop;
- Rect requestedFinalCrop;
+ Rect finalCrop_legacy;
+ Rect requestedFinalCrop_legacy;
// If set, defers this state update until the identified Layer
// receives a frame with the given frameNumber
- wp<Layer> barrierLayer;
- uint64_t frameNumber;
+ wp<Layer> barrierLayer_legacy;
+ uint64_t frameNumber_legacy;
// the transparentRegion hint is a bit special, it's latched only
// when we receive a buffer -- this is because it's "content"
// dependent.
- Region activeTransparentRegion;
- Region requestedTransparentRegion;
+ Region activeTransparentRegion_legacy;
+ Region requestedTransparentRegion_legacy;
int32_t appId;
int32_t type;
@@ -207,9 +207,9 @@
// space for top-level layers.
bool setPosition(float x, float y, bool immediate);
// Buffer space
- bool setCrop(const Rect& crop, bool immediate);
+ bool setCrop_legacy(const Rect& crop, bool immediate);
// Parent buffer space/display space
- bool setFinalCrop(const Rect& crop, bool immediate);
+ bool setFinalCrop_legacy(const Rect& crop, bool immediate);
// TODO(b/38182121): Could we eliminate the various latching modes by
// using the layer hierarchy?
@@ -223,8 +223,8 @@
bool setFlags(uint8_t flags, uint8_t mask);
bool setLayerStack(uint32_t layerStack);
uint32_t getLayerStack() const;
- void deferTransactionUntil(const sp<IBinder>& barrierHandle, uint64_t frameNumber);
- void deferTransactionUntil(const sp<Layer>& barrierLayer, uint64_t frameNumber);
+ void deferTransactionUntil_legacy(const sp<IBinder>& barrierHandle, uint64_t frameNumber);
+ void deferTransactionUntil_legacy(const sp<Layer>& barrierLayer, uint64_t frameNumber);
bool setOverrideScalingMode(int32_t overrideScalingMode);
void setInfo(int32_t type, int32_t appId);
bool reparentChildren(const sp<IBinder>& layer);