From ae0608381b2b4699218febd6d45ad9d307544d55 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Mon, 28 Nov 2016 10:51:00 -0800 Subject: SurfaceFlinger and libgui: Switch Z-order to signed type. In preparation for SurfaceFlinger child layers. In that model children's Z order will be relative to their parent. We need negative Z values to represent children stacking below their parent (e.g. SurfaceView). Java side already uses signed types strangely enough. Test: Basically a refactoring. SurfaceFlinger still works. Change-Id: Ifcece69f6f9d917cbf5238a59f8e5de1e8ba6a25 --- libs/gui/LayerState.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/gui/LayerState.cpp') diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 3949186f2b..16bf324298 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -28,7 +28,7 @@ status_t layer_state_t::write(Parcel& output) const output.writeUint32(what); output.writeFloat(x); output.writeFloat(y); - output.writeUint32(z); + output.writeInt32(z); output.writeUint32(w); output.writeUint32(h); output.writeUint32(layerStack); @@ -54,7 +54,7 @@ status_t layer_state_t::read(const Parcel& input) what = input.readUint32(); x = input.readFloat(); y = input.readFloat(); - z = input.readUint32(); + z = input.readInt32(); w = input.readUint32(); h = input.readUint32(); layerStack = input.readUint32(); -- cgit v1.2.3-59-g8ed1b