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

This commit is contained in:
TreeHugger Robot
2016-05-06 23:42:32 +00:00
committed by Android (Google) Code Review

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;