Merge "Force BlackSurface to be a black surface." into jb-dev

This commit is contained in:
Craig Mautner
2012-05-06 16:01:00 -07:00
committed by Android (Google) Code Review
2 changed files with 11 additions and 13 deletions

View File

@@ -42,8 +42,17 @@ public class BlackFrame {
this.layer = layer;
int w = r-l;
int h = b-t;
surface = new Surface(session, 0, "BlackSurface",
-1, w, h, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM);
if (WindowManagerService.DEBUG_SURFACE_TRACE) {
surface = new WindowStateAnimator.SurfaceTrace(session, 0, "BlackSurface("
+ l + ", " + t + ")",
-1, w, h, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM);
} else {
surface = new Surface(session, 0, "BlackSurface",
-1, w, h, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM);
}
surface.setAlpha(1);
surface.setLayer(layer);
surface.show();
if (WindowManagerService.SHOW_TRANSACTIONS ||
WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
" BLACK " + surface + ": CREATE layer=" + layer);
@@ -58,8 +67,6 @@ public class BlackFrame {
surface.setMatrix(
mTmpFloats[Matrix.MSCALE_X], mTmpFloats[Matrix.MSKEW_Y],
mTmpFloats[Matrix.MSKEW_X], mTmpFloats[Matrix.MSCALE_Y]);
surface.setAlpha(1.0f);
surface.setLayer(layer);
if (false) {
Slog.i(WindowManagerService.TAG, "Black Surface @ (" + left + "," + top + "): ("
+ mTmpFloats[Matrix.MTRANS_X] + ","
@@ -159,14 +166,6 @@ public class BlackFrame {
}
}
public void setAlpha(float alpha) {
for (int i=0; i<mBlackSurfaces.length; i++) {
if (mBlackSurfaces[i] != null) {
mBlackSurfaces[i].surface.setAlpha(alpha);
}
}
}
public void clearMatrix() {
for (int i=0; i<mBlackSurfaces.length; i++) {
if (mBlackSurfaces[i] != null) {

View File

@@ -862,7 +862,6 @@ class ScreenRotationAnimation {
} else {
mExitFrameFinalMatrix.setConcat(mExitTransformation.getMatrix(), mFrameInitialMatrix);
mExitingBlackFrame.setMatrix(mExitFrameFinalMatrix);
mExitingBlackFrame.setAlpha(mExitTransformation.getAlpha());
}
}