Loading core/java/android/app/ActivityView.java +1 −1 Original line number Diff line number Diff line Loading @@ -400,7 +400,7 @@ public class ActivityView extends ViewGroup { final IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); mRootSurfaceControl = new SurfaceControl.Builder(surfaceSession) .setContainerLayer(true) .setContainerLayer() .setParent(mSurfaceView.getSurfaceControl()) .setName(DISPLAY_NAME) .build(); Loading core/java/android/view/SurfaceControl.java +22 −18 Original line number Diff line number Diff line Loading @@ -501,7 +501,16 @@ public final class SurfaceControl implements Parcelable { } mWidth = width; mHeight = height; return this; // set this as a buffer layer since we are specifying a buffer size. return setFlags(FX_SURFACE_NORMAL, FX_SURFACE_MASK); } /** * Set the initial size of the controlled surface's buffers in pixels. */ private void unsetBufferSize() { mWidth = 0; mHeight = 0; } /** Loading Loading @@ -619,16 +628,11 @@ public final class SurfaceControl implements Parcelable { * Color layers will not have an associated BufferQueue and will instead always render a * solid color (that is, solid before plane alpha). Currently that color is black. * * @param isColorLayer Whether to create a color layer. * @hide */ public Builder setColorLayer(boolean isColorLayer) { if (isColorLayer) { mFlags |= FX_SURFACE_DIM; } else { mFlags &= ~FX_SURFACE_DIM; } return this; public Builder setColorLayer() { unsetBufferSize(); return setFlags(FX_SURFACE_DIM, FX_SURFACE_MASK); } private boolean isColorLayerSet() { Loading @@ -641,16 +645,11 @@ public final class SurfaceControl implements Parcelable { * Container layers will not be rendered in any fashion and instead are used * as a parent of renderable layers. * * @param isContainerLayer Whether to create a container layer. * @hide */ public Builder setContainerLayer(boolean isContainerLayer) { if (isContainerLayer) { mFlags |= FX_SURFACE_CONTAINER; } else { mFlags &= ~FX_SURFACE_CONTAINER; } return this; public Builder setContainerLayer() { unsetBufferSize(); return setFlags(FX_SURFACE_CONTAINER, FX_SURFACE_MASK); } private boolean isContainerLayerSet() { Loading @@ -658,7 +657,7 @@ public final class SurfaceControl implements Parcelable { } /** * Set 'Surface creation flags' such as {@link HIDDEN}, {@link SECURE}. * Set 'Surface creation flags' such as {@link #HIDDEN}, {@link #SECURE}. * * TODO: Finish conversion to individual builder methods? * @param flags The combined flags Loading @@ -668,6 +667,11 @@ public final class SurfaceControl implements Parcelable { mFlags = flags; return this; } private Builder setFlags(int flags, int mask) { mFlags = (mFlags & ~mask) | flags; return this; } } /** Loading core/java/android/view/SurfaceView.java +1 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import android.graphics.Region; import android.graphics.RenderNode; import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.SystemClock; import android.util.AttributeSet; Loading Loading @@ -588,7 +587,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb mBackgroundControl = new SurfaceControl.Builder(mSurfaceSession) .setName("Background for -" + name) .setOpaque(true) .setColorLayer(true) .setColorLayer() .setParent(mSurfaceControl) .build(); Loading services/core/java/com/android/server/display/ColorFade.java +1 −1 Original line number Diff line number Diff line Loading @@ -575,7 +575,7 @@ final class ColorFade { final SurfaceControl.Builder builder = new SurfaceControl.Builder(mSurfaceSession).setName("ColorFade"); if (mMode == MODE_FADE) { builder.setColorLayer(true); builder.setColorLayer(); } else { builder.setBufferSize(mDisplayWidth, mDisplayHeight); } Loading services/core/java/com/android/server/wm/BlackFrame.java +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public class BlackFrame { surface = dc.makeOverlay() .setName("BlackSurface") .setColorLayer(true) .setColorLayer() .setParent(null) // TODO: Work-around for b/69259549 .build(); transaction.setWindowCrop(surface, w, h); Loading Loading
core/java/android/app/ActivityView.java +1 −1 Original line number Diff line number Diff line Loading @@ -400,7 +400,7 @@ public class ActivityView extends ViewGroup { final IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); mRootSurfaceControl = new SurfaceControl.Builder(surfaceSession) .setContainerLayer(true) .setContainerLayer() .setParent(mSurfaceView.getSurfaceControl()) .setName(DISPLAY_NAME) .build(); Loading
core/java/android/view/SurfaceControl.java +22 −18 Original line number Diff line number Diff line Loading @@ -501,7 +501,16 @@ public final class SurfaceControl implements Parcelable { } mWidth = width; mHeight = height; return this; // set this as a buffer layer since we are specifying a buffer size. return setFlags(FX_SURFACE_NORMAL, FX_SURFACE_MASK); } /** * Set the initial size of the controlled surface's buffers in pixels. */ private void unsetBufferSize() { mWidth = 0; mHeight = 0; } /** Loading Loading @@ -619,16 +628,11 @@ public final class SurfaceControl implements Parcelable { * Color layers will not have an associated BufferQueue and will instead always render a * solid color (that is, solid before plane alpha). Currently that color is black. * * @param isColorLayer Whether to create a color layer. * @hide */ public Builder setColorLayer(boolean isColorLayer) { if (isColorLayer) { mFlags |= FX_SURFACE_DIM; } else { mFlags &= ~FX_SURFACE_DIM; } return this; public Builder setColorLayer() { unsetBufferSize(); return setFlags(FX_SURFACE_DIM, FX_SURFACE_MASK); } private boolean isColorLayerSet() { Loading @@ -641,16 +645,11 @@ public final class SurfaceControl implements Parcelable { * Container layers will not be rendered in any fashion and instead are used * as a parent of renderable layers. * * @param isContainerLayer Whether to create a container layer. * @hide */ public Builder setContainerLayer(boolean isContainerLayer) { if (isContainerLayer) { mFlags |= FX_SURFACE_CONTAINER; } else { mFlags &= ~FX_SURFACE_CONTAINER; } return this; public Builder setContainerLayer() { unsetBufferSize(); return setFlags(FX_SURFACE_CONTAINER, FX_SURFACE_MASK); } private boolean isContainerLayerSet() { Loading @@ -658,7 +657,7 @@ public final class SurfaceControl implements Parcelable { } /** * Set 'Surface creation flags' such as {@link HIDDEN}, {@link SECURE}. * Set 'Surface creation flags' such as {@link #HIDDEN}, {@link #SECURE}. * * TODO: Finish conversion to individual builder methods? * @param flags The combined flags Loading @@ -668,6 +667,11 @@ public final class SurfaceControl implements Parcelable { mFlags = flags; return this; } private Builder setFlags(int flags, int mask) { mFlags = (mFlags & ~mask) | flags; return this; } } /** Loading
core/java/android/view/SurfaceView.java +1 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import android.graphics.Region; import android.graphics.RenderNode; import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.SystemClock; import android.util.AttributeSet; Loading Loading @@ -588,7 +587,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb mBackgroundControl = new SurfaceControl.Builder(mSurfaceSession) .setName("Background for -" + name) .setOpaque(true) .setColorLayer(true) .setColorLayer() .setParent(mSurfaceControl) .build(); Loading
services/core/java/com/android/server/display/ColorFade.java +1 −1 Original line number Diff line number Diff line Loading @@ -575,7 +575,7 @@ final class ColorFade { final SurfaceControl.Builder builder = new SurfaceControl.Builder(mSurfaceSession).setName("ColorFade"); if (mMode == MODE_FADE) { builder.setColorLayer(true); builder.setColorLayer(); } else { builder.setBufferSize(mDisplayWidth, mDisplayHeight); } Loading
services/core/java/com/android/server/wm/BlackFrame.java +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public class BlackFrame { surface = dc.makeOverlay() .setName("BlackSurface") .setColorLayer(true) .setColorLayer() .setParent(null) // TODO: Work-around for b/69259549 .build(); transaction.setWindowCrop(surface, w, h); Loading