diff options
| author | Chong Zhang <chz@google.com> | 2015-11-12 23:40:58 -0800 |
|---|---|---|
| committer | Chong Zhang <chz@google.com> | 2015-11-13 13:03:48 -0800 |
| commit | f4abc2b701c23978e8bd5e4fc3e183e519aede4a (patch) | |
| tree | ea926b49b3999c98d771275b9819bb010854c383 /core/java/android/view/WindowManagerGlobal.java | |
| parent | a1ace2219a8598e48b70906a96a012a9016ea5f8 (diff) | |
Need to updateSurface if surface size was changed in relayoutWindow
On some chips, SurfaceControl.setSize will not take effect for several
frames. We have to also do a updateSurface/invalidate (which destroys
and creates the EGLSurface) to get the size right.
Keep track of SurfaceControl size changes in window manager, and pass
that to ViewRootImpl, so that a updateSurface is done either the surface
itself or its size is changed.
Note that we don't use frame size change to trigger updateSurface, because
frame size could be different from the surface size that window manager set.
For example during drag resizing, the surface size is fullscreen although
frame size changes constantly. Doing updateSurface upon frame size change
could cause us to do many unnecessary updateSurface.
bug: 25583942
Change-Id: I1989613a187bb6ef1c179bd2800c6a7b01fcdb3a
Diffstat (limited to 'core/java/android/view/WindowManagerGlobal.java')
| -rw-r--r-- | core/java/android/view/WindowManagerGlobal.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java index 43d643e51c32..c08e1b5803c4 100644 --- a/core/java/android/view/WindowManagerGlobal.java +++ b/core/java/android/view/WindowManagerGlobal.java @@ -77,6 +77,11 @@ public final class WindowManagerGlobal { public static final int RELAYOUT_RES_DRAG_RESIZING = 0x8; /** + * The window manager has changed the size of the surface from the last call. + */ + public static final int RELAYOUT_RES_SURFACE_RESIZED = 0x10; + + /** * Flag for relayout: the client will be later giving * internal insets; as a result, the window will not impact other window * layouts until the insets are given. |
