For app transitions that go to Launcher, Launcher is initially
hidden, including the leash controlling it as well as the actual
WSA surface. Since the barrier layer of the leash of the closing
app is Launcher WSA, which is a child of the Launcher leash, the
sync point will be cleared because it's not yet shown, as the
showing itself is synced to WSA Launcher surface. However that
destroys the synchronization, leading to jank in various ways.
The justification why this code was added doesn't make sense to
me: SurfaceView usually synchronizes with Activity main window
surfaces. These get destroyed as soon as the activity goes away.
We don't think that logic is needed at all.
Test: Open app, press back, observe no jank
Test: Play video in app
Fixes:
126340236
Change-Id: Ib70d3bbdce1c7206487359213803e3e59d332400
mNeedsFiltering = (!getActiveTransform(c).preserveRects() || type >= ui::Transform::SCALE);
}
- // If the layer is hidden, signal and clear out all local sync points so
- // that transactions for layers depending on this layer's frames becoming
- // visible are not blocked
- if (c.flags & layer_state_t::eLayerHidden) {
- clearSyncPoints();
- }
-
if (mCurrentState.inputInfoChanged) {
flags |= eInputInfoChanged;
mCurrentState.inputInfoChanged = false;
mCurrentParent = layer;
}
-void Layer::clearSyncPoints() {
- for (const auto& child : mCurrentChildren) {
- child->clearSyncPoints();
- }
-
- Mutex::Autolock lock(mLocalSyncPointMutex);
- for (auto& point : mLocalSyncPoints) {
- point->setFrameAvailable();
- }
- mLocalSyncPoints.clear();
-}
-
int32_t Layer::getZ() const {
return mDrawingState.z;
}
virtual bool applyPendingStates(State* stateToCommit);
virtual uint32_t doTransactionResize(uint32_t flags, Layer::State* stateToCommit);
- void clearSyncPoints();
-
// Returns mCurrentScaling mode (originating from the
// Client) or mOverrideScalingMode mode (originating from
// the Surface Controller) if set.