@@ -42,8 +42,17 @@ class BlackSurface {
4242 this .layer = layer ;
4343 int w = r -l ;
4444 int h = b -t ;
45- surface = new Surface (session , 0 , "BlackSurface" ,
46- -1 , w , h , PixelFormat .OPAQUE , Surface .FX_SURFACE_DIM );
45+ if (WindowManagerService .DEBUG_SURFACE_TRACE ) {
46+ surface = new WindowStateAnimator .SurfaceTrace (session , 0 , "BlackSurface("
47+ + l + ", " + t + ")" ,
48+ -1 , w , h , PixelFormat .OPAQUE , Surface .FX_SURFACE_DIM );
49+ } else {
50+ surface = new Surface (session , 0 , "BlackSurface" ,
51+ -1 , w , h , PixelFormat .OPAQUE , Surface .FX_SURFACE_DIM );
52+ }
53+ surface .setAlpha (1 );
54+ surface .setLayer (layer );
55+ surface .show ();
4756 if (WindowManagerService .SHOW_TRANSACTIONS ||
4857 WindowManagerService .SHOW_SURFACE_ALLOC ) Slog .i (WindowManagerService .TAG ,
4958 " BLACK " + surface + ": CREATE layer=" + layer );
@@ -58,8 +67,6 @@ void setMatrix(Matrix matrix) {
5867 surface .setMatrix (
5968 mTmpFloats [Matrix .MSCALE_X ], mTmpFloats [Matrix .MSKEW_Y ],
6069 mTmpFloats [Matrix .MSKEW_X ], mTmpFloats [Matrix .MSCALE_Y ]);
61- surface .setAlpha (1.0f );
62- surface .setLayer (layer );
6370 if (false ) {
6471 Slog .i (WindowManagerService .TAG , "Black Surface @ (" + left + "," + top + "): ("
6572 + mTmpFloats [Matrix .MTRANS_X ] + ","
@@ -159,14 +166,6 @@ public void setMatrix(Matrix matrix) {
159166 }
160167 }
161168
162- public void setAlpha (float alpha ) {
163- for (int i =0 ; i <mBlackSurfaces .length ; i ++) {
164- if (mBlackSurfaces [i ] != null ) {
165- mBlackSurfaces [i ].surface .setAlpha (alpha );
166- }
167- }
168- }
169-
170169 public void clearMatrix () {
171170 for (int i =0 ; i <mBlackSurfaces .length ; i ++) {
172171 if (mBlackSurfaces [i ] != null ) {
0 commit comments