[go: nahoru, domu]

History log of /frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
91b22809648a33d64c159e8496773b1b3b2ab6ca 29-Jun-2016 Robert Carr <racarr@google.com> Only use one SurfaceControlWithBackground per AppToken.

In the past, if an app never renders to a SurfaceView, it will be
invisible despite having FLAG_OPAQUE. This means an app could leave a
totally empty SurfaceView (never drawing in to it) on top of a second
SurfaceView, and expect the second one to be visible. This is probably
buggy app behavior because FLAG_OPAQUE means if they ever draw anything at all
in to the top SurfaceView the bottom one will become totally invisible.
However this has worked in the past, so we have to preserve things for
apps. To accomplish this we ensure only the bottom most visible
SurfaceView for a given AppToken will receive a background. We achieve
this by synchronizing through the app token whenever visibility or
layering of a SurfaceView changes.

Bug: 29580298
Change-Id: I0023326323cb961b56404fd49093384e7b72aa54
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
938a70142ebb504ef2e079708c48315f80707b53 11-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Restore setCropInTransaction HiddenForCrop behavior." into nyc-dev
086d2929f739ab217c38f99b76fd70f30dcfa478 09-Jun-2016 Robert Carr <racarr@google.com> Place a black layer behind SurfaceView.

For SurfaceView's which do not implement
SurfaceRedrawNeeded we can see holes through to the
background in various scenarios. We prevent this by
placing a DimLayer behind opaque SurfaceViews. SurfaceFlinger
will remove it from the visible layers when the SurfaceView
totally obscures it.

Bug: 28763785
Change-Id: I9b4d1ba8be786f30432a6a3b42e5616662cdc090
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
4320d33a065173dff97ddb462c8a6a0a649a41e5 11-Jun-2016 Robert Carr <racarr@google.com> Restore setCropInTransaction HiddenForCrop behavior.

Prior to c/1106850 setCropInTransaction hid the surface
for crop width and height <= 0. That CL allowed
setting -1 for crop width and height which SF
determines as clearing the crop. Other portions of the code
depend on the old behavior though for negative values, so restore
the behavior of setCropInTransaction and use a new clearCrop
method for the new code.

Bug: 29276588
Change-Id: I728666009c362ff635c7ebfb3ef2e83428fb03fe
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
a9408d4a4809dd229fb7fb8f9594cb6db4b1da64 03-Jun-2016 Robert Carr <racarr@google.com> PiP animation: Move window with resize when ending animation.

At the end of the animation (when going from larger to smaller),
we are left with a scaled surface, that we want to seamlessly
resize to an unscaled surface of the new size. Because we have scaled
the shadow region of the surface, the position of the content
will differ before and after the resize applies. We use new
SurfaceFlinger API to cause position updates to apply after
resize. Because we have to switch into SCALING_MODE_FREEZE,
we could end up prematurely cropping the window, so we
switch to using screen space crop for the pinned stack.

Bug: 28899837
Change-Id: I9b762a237413e4fa3d432e67d30c7125bfef484c
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
fed100742011bbc3092925c37e9f2df4ab04b6b5 26-May-2016 Robert Carr <racarr@google.com> Ensure surfaces only resize during relayout.

For clients which use an indeterminate measure spec in their
layout params (MATCH_PARENT). We could try and change their window size
due to a stack resize, before the client calls relayout. This isn't
safe as the client never had an opportunity to pause rendering, so it
could be in the middle of producing a frame for the old size to suddenly
find the buffer size change underneath it.

Bug: 28559097
Change-Id: I3982936fdf85c22def2f9c754d5508e029e4a84d
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
3cc58ddd3c39580d0c008d1cf7138d5634be1b90 21-Apr-2016 Chong Zhang <chz@google.com> Fix dead surface/window left on screen

If the surface is explicitly hidden while we're changing resizing mode,
we need to discard the preserved surface immediately, otherwise it could
linger around on screen.

Do not mark mAnimatingExit in setTokenVisibilityLocked. This flag can only
be set after client relayouts to invisible. There we set mAnimatingExit and
mAnimating, so that when animation finishes the surface is marked to be
destroyed. If we marke it too early (and not mark mAnimating at the same
time), the surface may get stuck in exiting state.

bug: 28236574
Change-Id: I5cc916dfa698113e1d783a66547e1878469a9879
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
1ca6a33f36357281b3445e85d9e67cacd1a12ede 12-Apr-2016 Robert Carr <racarr@google.com> Force windows to be scalable during pinned animation.

We resize windows at the beginning of the pinned stack
animation when animating to a larger size, and so for some
duration a resize will be pending. We need to force the window
out of SCALING_MODE_FREEZE so we can animate during this period.

Bug: 27891386
Change-Id: I5cff599ed67f2c179e938662b6f0d99bd790aaba
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
6a7c90a12b5e5250e0350d35ca6547b26630653f 11-Mar-2016 Jorim Jaggi <jjaggi@google.com> Implement clip modes during animation

Introduce modes how surfaces are clipped to the stack bounds
during transitions.

Use setFinalCrop to implement STACK_CLIP_AFTER_ANIM.

Add logic to determine which stack clip mode to use.

Bug: 26559810
Change-Id: I8edc47de3aaf1ef12055cefd8ceb8df536c5109a
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
628e27f1053c3e2f94f59656b82b9cefd75c6e2e 18-Mar-2016 Rob Carr <racarr@google.com> Merge "Include more methods in SurfaceTrace." into nyc-dev
ae35fef616c14f721cf12d6a0f78bef9fef5df9d 16-Mar-2016 Chong Zhang <chz@google.com> Apply temp inset bounds to child window if it's not empty

bug: 27676101
bug: 27687126
Change-Id: Iab1129cc0224194e7a9d11d0454bc7af6897a6e8
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
6a19b4ff88913ed8db8432d9cc89f919e655f2d4 15-Mar-2016 Robert Carr <racarr@google.com> Include more methods in SurfaceTrace.

SurfaceTrace was missing setTransparentRegionHint.

Change-Id: I3fc946493cc0daa0ab5ad613feef3e99a11ac8f8
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
2728bf4bf9c4bc73837f41d3bf0251a7de6c9e16 03-Mar-2016 Wale Ogunwale <ogunwale@google.com> Added more log points for add/remove in window manager.

Bug: 27286867
Change-Id: Iecb522a1ff7e093a8feef27fdd68c50b9a80d553
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
47e36a3e270ff3e94750d730ac2a9f0bdfe96c04 01-Mar-2016 Chong Zhang <chz@google.com> Force disconnect when the surface is about to be saved.

Some client will not disconnect, and if we're saving the surface (instead
of destroying it), we need to make sure the surface is disconnected.
Otherwise the client won't be able to reconnect to the same surface.

bug: 27295820
Change-Id: I471b8fbe8f590c900e17a017167466fc8a70b87a
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
1eb39b009ef6cfa133cbd5d6ea8caaac64ee1559 25-Feb-2016 Jorim Jaggi <jjaggi@google.com> Start with mHiddenForOtherReasons=true

Initially a surface is hidden after creating, so reflect that fact
in mHiddenForOtherReasons, so it doesn't get shown before the correct
transformation is applied.

Bug: 27350530
Change-Id: Idfe8723195dd1488894da066fafee1f2c2afc12d
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
5e6968db630d26872306c4b23aa2c600d83ed454 20-Feb-2016 Jorim Jaggi <jjaggi@google.com> Fix disappearing windows after moving divider to side

Because we only hide the surface when the clip rect got empty
but never showed it again if it got non-empty, app windows
disappeared after moving the docked stack divider to the
edge of the screen. Now we reshow the surfaces if the clip-rect
gets non-empty.

However, this introduces another bug while dismissing the docked
stack: Because we move all windows to the fullscreen stack, we resize
them but until the app transition starts, it can take a while and
during this time the app surface would be visible with the wrong
bounds. To fix this, we notify the windows that we are repositioning
ourselves in our stack. When applying the clip-rect, we detect that
situation and then we set the clip rect to empty if it was just empty
before and we just moved in the stack, to fix this very specific
issue.

I'm really not proud of this solution but at this point we can't
revisit how app transitions are executed in terms of timing and
ordering, so I thought this little hack is the best solution at
this point.

Bug: 26588506
Change-Id: I78305f7f7ef6c3da3c126a58d751117fcee23ca9
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
722ff89fd1684179c342c3e9b6014c5499f90b90 18-Feb-2016 Wale Ogunwale <ogunwale@google.com> Protect against surfaceController and hasSurface getting out of sync.

WindowStateAnimator.mSurfaceController is set to null whenever a
surface is destroyed and WindowState.mHasSurface is set to false
shortly after that. However, it is possible for them to get out
of sync in a couple of places due to exceptions or duplicate destroy.
Consolidated the call to set WindowState.mHasSurface inside a finally
block in WindowStateAnimator.destroySurface
Also, cleaned up the code a little to that it is more obvious what is
going on.

Bug: 27235356
Change-Id: I7e6d0c1fb015531c393ac86dcaebebd134fad612
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
0464a9345e7e3e666a84a3489cfffd5e45a21353 03-Feb-2016 Chong Zhang <chz@google.com> Disable WM loggings

bug: 26819496
Change-Id: Ib5258391101293c9aaca3b865e1f1580234bcbe3
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
e1034cc39a574c3e8dc481810fb8f24571c41d70 01-Feb-2016 Robert Carr <racarr@google.com> Ensure Surface matrix set even when size unchanged.

Simple error preventing transform matrices from being
updated when the size isn't changed.

Bug: 26454664
Bug: 25287371
Change-Id: I0e1a71ceda725e26d49786593665cf0865213c91
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
198dcbf5231761b7b644d9d7fbceb23e1f0f9aec 18-Jan-2016 Filip Gruszczynski <gruszczy@google.com> Fix several small logging issues.

This includes:
1) invert HIDE_STACK_CRAWLS to SHOW_STACK_CRAWLS so it's immediately
clear from the config file that something is enabled (if anything is
true).
2) Merge stack collection code into a method, so we can remove the
repeated code.
3) Remove copying of some constants in AppTransition and just import
them directly.

Change-Id: I3190ee0a5963720ac6285b4f48b2705e84f04ab5
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
ce4f2f18b720b2abe90f87e2066c538f51ee544b 15-Dec-2015 Robert Carr <racarr@google.com> Temporary enable logging for monkey testing

Temporary enable logging for tracing 26157153 in monkey testing.

Bug: 26157153
Change-Id: I85aef42c426ceaa831b7919a37dd35ef78e9c779
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
0bd180d8880b3d1b9677f154c034a2af840b4796 08-Dec-2015 Filip Gruszczynski <gruszczy@google.com> Improve debugging setup for window manager package.

This moves debug flags to a dedicated class and also provides a
mechanism to either have fine grained tags or one common tag for easier
grepping the logcat. This mimicks the approach in activity manager
package.

Change-Id: Ie8c08b9a3d8b182335ee5547ee05d21b5933db6b
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
19723a4a2bca0660f7ee7c29926af285d94ab5a2 26-Nov-2015 Filip Gruszczynski <gruszczy@google.com> Revert "Destroy docked divider surface when it's hidden."

This reverts commit cb5f57bc580d7f73b93c8f504daa4dcd74cdce72.

Change-Id: I1f77e1ccd5382ed57b8e4165afd79db5223f51c1
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
cb5f57bc580d7f73b93c8f504daa4dcd74cdce72 24-Nov-2015 Filip Gruszczynski <gruszczy@google.com> Destroy docked divider surface when it's hidden.

Also includes bunch of small refactorings:
* destroying surfaces is now fully contained within
WindowManagerServices and mDestroySurface can be privatized;
* WMS.isDockedStackResizingLocked can be removed;
* mScreenCaptureDisabled changes from being SparseArray<Boolean> to
SparseBooleanArray, which not only avoids boxing but also makes code
simpler (no need to check for null)

Bug: 25844096
Change-Id: I0e5462760ffbc947ce6dc52ef429fa270ffc6786
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
78a08ee876794586e1d429e67d4b94209415ea5a 09-Nov-2015 Filip Gruszczynski <gruszczy@google.com> Fix blink when docking a window.

We need to be very precise about removing the old window when the new
one is shown. The right moment is immediately after the first frame
of the new window entrance animation gets commited. This requires
more infrastructure and flags, rather than depending on the old ones
and hoping that they will match our needs.

Bug: 25075151

Change-Id: I0fdbf38d0915ded3300d75fc7268e619b574bcf5
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
10a80e0b5b2efb3a65b66dfa8b6fee6d0904ea42 06-Nov-2015 Filip Gruszczynski <gruszczy@google.com> Fix windows disappearing when resizing freeform or docked.

Also includes some code clarity improvements: mHasSurface is set using a
setter, some fields get private.

Change-Id: I2f834880493c008fdccf07ff6ebfebd2e26690a9
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
63a35e2343468a04e360f0514c6c9dc03068c185 06-Nov-2015 Filip Gruszczynski <gruszczy@google.com> Fix minor problems when resizing/maximizing docked window.

When maximizing the transition should originate from visible bounds, so
the first frame matches what is visible to the user. When switching to
the big surface, we only need to increase the layer by one, instead of
having artificially large value. If we use the large value, it will
cause a flicker over system windows.

Also includes some cleanup, like static imports and necessary logging.

Bug: 24913915

Change-Id: I84d7594622aa639e2008c662f941edf9c20b3202
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java
e6a8351bc715999d1e42dcc1003a6eda6c318dd9 04-Nov-2015 Robert Carr <racarr@google.com> Extract application window usage of SurfaceController.

Abstract the usage of SurfaceController from wm w.r.t
application windows in to a new WindowSurfaceController
class. This class tracks boring book keeping, logging,
errors, etc...to lend clarity to difficult policy
code in WindowStateAnimator et al.

Change-Id: Ifcd5d48a51e68564f49e799ae793b320cac88645
/frameworks/base/services/core/java/com/android/server/wm/WindowSurfaceController.java