Merge "Reset transparent region when saving a surface" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
52b952a296
@@ -1995,12 +1995,17 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
|||||||
return mAppToken.shouldSaveSurface();
|
return mAppToken.shouldSaveSurface();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static final Region sEmptyRegion = new Region();
|
||||||
|
|
||||||
void destroyOrSaveSurface() {
|
void destroyOrSaveSurface() {
|
||||||
mSurfaceSaved = shouldSaveSurface();
|
mSurfaceSaved = shouldSaveSurface();
|
||||||
if (mSurfaceSaved) {
|
if (mSurfaceSaved) {
|
||||||
if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {
|
if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {
|
||||||
Slog.v(TAG, "Saving surface: " + this);
|
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.hide("saved surface");
|
||||||
mWinAnimator.mDrawState = WindowStateAnimator.NO_SURFACE;
|
mWinAnimator.mDrawState = WindowStateAnimator.NO_SURFACE;
|
||||||
|
|||||||
Reference in New Issue
Block a user