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