Change what in layer_state_t to 64 bit.
We finally reached the edge of 32 bit enum for it in ag/5659622.
Bug: None
Test: Builds.
Change-Id: If2bab78980caf061f100ed7d75d112882b9e0133
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 407eecb..4f63415 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -16,6 +16,8 @@
#define LOG_TAG "LayerState"
+#include <inttypes.h>
+
#include <utils/Errors.h>
#include <binder/Parcel.h>
#include <gui/ISurfaceComposerClient.h>
@@ -27,7 +29,7 @@
status_t layer_state_t::write(Parcel& output) const
{
output.writeStrongBinder(surface);
- output.writeUint32(what);
+ output.writeUint64(what);
output.writeFloat(x);
output.writeFloat(y);
output.writeInt32(z);
@@ -97,7 +99,7 @@
status_t layer_state_t::read(const Parcel& input)
{
surface = input.readStrongBinder();
- what = input.readUint32();
+ what = input.readUint64();
x = input.readFloat();
y = input.readFloat();
z = input.readInt32();
@@ -366,7 +368,7 @@
if ((other.what & what) != other.what) {
ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? "
- "other.what=0x%X what=0x%X",
+ "other.what=0x%" PRIu64 " what=0x%" PRIu64,
other.what, what);
}
}
diff --git a/libs/gui/include/gui/LayerState.h b/libs/gui/include/gui/LayerState.h
index 3cfee9e..5d27a75 100644
--- a/libs/gui/include/gui/LayerState.h
+++ b/libs/gui/include/gui/LayerState.h
@@ -124,7 +124,7 @@
float dsdy{0};
};
sp<IBinder> surface;
- uint32_t what;
+ uint64_t what;
float x;
float y;
int32_t z;
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 5b3c477..39d54a2 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3491,7 +3491,7 @@
uint32_t flags = 0;
- const uint32_t what = s.what;
+ const uint64_t what = s.what;
bool geometryAppliesWithResize =
what & layer_state_t::eGeometryAppliesWithResize;