diff options
Diffstat (limited to 'services/core/java/com/android/server/wm/WindowManagerService.java')
-rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index b84b506..d956d76 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -3187,10 +3187,13 @@ public class WindowManagerService extends IWindowManager.Stub } } if ((attrChanges&WindowManager.LayoutParams.FORMAT_CHANGED) != 0) { - // To change the format, we need to re-build the surface. - winAnimator.destroySurfaceLocked(); - toBeDisplayed = true; - surfaceChanged = true; + // If the format can be changed in place yaay! + // If not, fall back to a surface re-build + if (!winAnimator.tryChangeFormatInPlaceLocked()) { + winAnimator.destroySurfaceLocked(); + toBeDisplayed = true; + surfaceChanged = true; + } } try { if (!win.mHasSurface) { |