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
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index 183b42d..4356a58 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -142,7 +142,7 @@
status_t show(const sp<IBinder>& id);
status_t setFlags(const sp<IBinder>& id, uint32_t flags, uint32_t mask);
status_t setTransparentRegionHint(const sp<IBinder>& id, const Region& transparent);
- status_t setLayer(const sp<IBinder>& id, uint32_t layer);
+ status_t setLayer(const sp<IBinder>& id, int32_t layer);
status_t setLayerInfo(const sp<IBinder>& id, uint32_t type, uint32_t appid);
status_t setAlpha(const sp<IBinder>& id, float alpha=1.0f);
status_t setMatrix(const sp<IBinder>& id, float dsdx, float dtdx, float dsdy, float dtdy);
@@ -213,12 +213,12 @@
const sp<IBinder>& display,
const sp<IGraphicBufferProducer>& producer,
Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
- uint32_t minLayerZ, uint32_t maxLayerZ,
+ int32_t minLayerZ, int32_t maxLayerZ,
bool useIdentityTransform);
static status_t captureToBuffer(
const sp<IBinder>& display,
Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
- uint32_t minLayerZ, uint32_t maxLayerZ,
+ int32_t minLayerZ, int32_t maxLayerZ,
bool useIdentityTransform,
uint32_t rotation,
sp<GraphicBuffer>* outbuffer);
@@ -242,11 +242,11 @@
bool useIdentityTransform);
status_t update(const sp<IBinder>& display,
Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
- uint32_t minLayerZ, uint32_t maxLayerZ,
+ int32_t minLayerZ, int32_t maxLayerZ,
bool useIdentityTransform);
status_t update(const sp<IBinder>& display,
Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
- uint32_t minLayerZ, uint32_t maxLayerZ,
+ int32_t minLayerZ, int32_t maxLayerZ,
bool useIdentityTransform, uint32_t rotation);
sp<CpuConsumer> getCpuConsumer() const;