Merge "Reset transparent region when saving a surface" into nyc-dev

am: 52b952a296

* commit '52b952a296b84283db9041de96e2ff408b221572':
  Reset transparent region when saving a surface

Change-Id: Ida763eab76b258a5f454aa4249cbd7ce3a02c81a
This commit is contained in:
Chris Craik
2016-05-07 00:02:50 +00:00
committed by android-build-merger

View File

@@ -1995,12 +1995,17 @@ final class WindowState implements WindowManagerPolicy.WindowState {
return mAppToken.shouldSaveSurface();
}
static final Region sEmptyRegion = new Region();
void destroyOrSaveSurface() {
mSurfaceSaved = shouldSaveSurface();
if (mSurfaceSaved) {
if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {
Slog.v(TAG, "Saving surface: " + this);
}
// Previous user of the surface may have set a transparent region signaling a portion
// doesn't need to be composited, so reset to default empty state.
mSession.setTransparentRegion(mClient, sEmptyRegion);
mWinAnimator.hide("saved surface");
mWinAnimator.mDrawState = WindowStateAnimator.NO_SURFACE;