Limit creating new surface for legacy apps to size changes.
Creating the surface for every change (such as creation and visibility) can lead to issues swapping buffers. This changelist limits the action to only when the size changes. Change-Id: Ic549d244613a93a43a9f4ddf284bbfb0c13300fa Fixes: 62801621 Test: follow repro steps in bug, verified no crash. Test: go/wm-smoke
This commit is contained in:
@@ -641,7 +641,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb
|
||||
mSurface.copyFrom(mSurfaceControl);
|
||||
}
|
||||
|
||||
if (getContext().getApplicationInfo().targetSdkVersion
|
||||
if (sizeChanged && getContext().getApplicationInfo().targetSdkVersion
|
||||
< Build.VERSION_CODES.O) {
|
||||
// Some legacy applications use the underlying native {@link Surface} object
|
||||
// as a key to whether anything has changed. In these cases, updates to the
|
||||
|
||||
Reference in New Issue
Block a user