commit | 83f8e4d9afe0711b237d55864c8d986fe9ebb448 | [log] [tgz] |
---|---|---|
author | Robert Carr <racarr@google.com> | Wed Nov 15 14:37:37 2017 -0800 |
committer | Robert Carr <racarr@google.com> | Wed Nov 15 14:37:37 2017 -0800 |
tree | 4705dc0e159f7bc96d1624e50ec3dded423e602f | |
parent | 81be9993fc65414fea8a76c8e8e37122c1542da7 [diff] [blame] |
Fix signedness issue in LayerProtoParser Makes things appear out of order in the dump. Test: Manual use of dumpsys. Change-Id: I48b29281cddf2f66a88e21e162858205fbace25d
diff --git a/services/surfaceflinger/layerproto/LayerProtoParser.cpp b/services/surfaceflinger/layerproto/LayerProtoParser.cpp index e6f2ce7..bf37e1e 100644 --- a/services/surfaceflinger/layerproto/LayerProtoParser.cpp +++ b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
@@ -29,9 +29,11 @@ uint32_t rs = rhs->layerStack; if (ls != rs) return ls < rs; - uint32_t lz = lhs->z; - uint32_t rz = rhs->z; - if (lz != rz) return lz < rz; + int32_t lz = lhs->z; + int32_t rz = rhs->z; + if (lz != rz) { + return (lz > rz) ? 1 : -1; + } return lhs->id < rhs->id; }