diff options
author | 2020-09-12 15:49:39 +0000 | |
---|---|---|
committer | 2020-10-01 18:39:21 +0000 | |
commit | 11dcc2207f651acf836aa611e48ce75db90258b0 (patch) | |
tree | ff47bdb8a7bd426b1bc9be8f37b18dddbdd47f4b /libs/gui/SurfaceComposerClient.cpp | |
parent | 97651d23e882aa8cb24d1a6b45808a549474bcb6 (diff) |
Pass surface control instead of handle as reference to layers in
LayerState
Allows us to have access to the layer id stored in surface control so that it can be dumped when tracing the transaction merges
Test: Existing tests
Change-Id: I3e466c69585937d8ce74a29a49fdbb7b3353a460
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 2f6a34bf4f..99d9ebaa92 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -875,8 +875,8 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setLayer return *this; } -SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setRelativeLayer(const sp<SurfaceControl>& sc, const sp<IBinder>& relativeTo, - int32_t z) { +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setRelativeLayer( + const sp<SurfaceControl>& sc, const sp<SurfaceControl>& relativeTo, int32_t z) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; @@ -884,7 +884,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setRelat } s->what |= layer_state_t::eRelativeLayerChanged; s->what &= ~layer_state_t::eLayerChanged; - s->relativeLayerHandle = relativeTo; + s->relativeLayerSurfaceControl = relativeTo; s->z = z; registerSurfaceControlForCallback(sc); @@ -1028,16 +1028,16 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBackg } SurfaceComposerClient::Transaction& -SurfaceComposerClient::Transaction::deferTransactionUntil_legacy(const sp<SurfaceControl>& sc, - const sp<IBinder>& handle, - uint64_t frameNumber) { +SurfaceComposerClient::Transaction::deferTransactionUntil_legacy( + const sp<SurfaceControl>& sc, const sp<SurfaceControl>& barrierSurfaceControl, + uint64_t frameNumber) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eDeferTransaction_legacy; - s->barrierHandle_legacy = handle; + s->barrierSurfaceControl_legacy = barrierSurfaceControl; s->barrierFrameNumber = frameNumber; registerSurfaceControlForCallback(sc); @@ -1062,30 +1062,28 @@ SurfaceComposerClient::Transaction::deferTransactionUntil_legacy(const sp<Surfac } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::reparentChildren( - const sp<SurfaceControl>& sc, - const sp<IBinder>& newParentHandle) { + const sp<SurfaceControl>& sc, const sp<SurfaceControl>& newParent) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eReparentChildren; - s->reparentHandle = newParentHandle; + s->reparentSurfaceControl = newParent; registerSurfaceControlForCallback(sc); return *this; } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::reparent( - const sp<SurfaceControl>& sc, - const sp<IBinder>& newParentHandle) { + const sp<SurfaceControl>& sc, const sp<SurfaceControl>& newParent) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eReparent; - s->parentHandleForChild = newParentHandle; + s->parentSurfaceControlForChild = newParent; registerSurfaceControlForCallback(sc); return *this; |