Revert "Avoid changing z-order of overlay layer after resizing display"
This reverts commit 4552d3e896.
Reason for revert: b/288726181
The effect of
SurfaceControl.Builder#setParent(null);
and
SurfaceControl.Transaction#reparent(sc, null);
are different.
The former is to put at root layer, but the latter is like
to detach the layer. So the flickering was disappeared by
not showing the layer. That is unexpected. Currently there
seems to be no way to assign root layer by transaction.
Change-Id: I5b903d5dc7c30b644365b4b28048e74453e45922
This commit is contained in:
committed by
Android (Google) Code Review
parent
4552d3e896
commit
f70dccdb53
@@ -2262,7 +2262,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
// transitions anyways).
|
||||
return wc.getParent().asDisplayContent().getWindowingLayer();
|
||||
}
|
||||
return wc.getParentSurfaceControl();
|
||||
return wc.getParent().getSurfaceControl();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -388,23 +388,12 @@ class WindowToken extends WindowContainer<WindowState> {
|
||||
@Override
|
||||
SurfaceControl.Builder makeSurface() {
|
||||
final SurfaceControl.Builder builder = super.makeSurface();
|
||||
// The overlay may use COLOR_MODE_A8 that needs to be at the top of the display to avoid
|
||||
// additional memory usage, see b/235601833. Note that getParentSurfaceControl() must use
|
||||
// the same parent.
|
||||
if (mRoundedCornerOverlay) {
|
||||
builder.setParent(null);
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurfaceControl getParentSurfaceControl() {
|
||||
if (mRoundedCornerOverlay) {
|
||||
return null;
|
||||
}
|
||||
return super.getParentSurfaceControl();
|
||||
}
|
||||
|
||||
boolean isClientVisible() {
|
||||
return mClientVisible;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user