Implement construction of container layers
am: c1ea10447f
Change-Id: I5a8f0080051d2ae66a4a2f99c4a88ef452f0a467
This commit is contained in:
@@ -267,6 +267,13 @@ public class SurfaceControl implements Parcelable {
|
||||
*/
|
||||
public static final int FX_SURFACE_DIM = 0x00020000;
|
||||
|
||||
/**
|
||||
* Surface creation flag: Creates a container surface.
|
||||
* This surface will have no buffers and will only be used
|
||||
* as a container for other surfaces, or for its InputInfo.
|
||||
*/
|
||||
public static final int FX_SURFACE_CONTAINER = 0x00080000;
|
||||
|
||||
/**
|
||||
* Mask used for FX values above.
|
||||
*
|
||||
@@ -530,6 +537,23 @@ public class SurfaceControl implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether a 'ContainerLayer' is to be constructed.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
public Builder setContainerLayer(boolean isContainerLayer) {
|
||||
if (isContainerLayer) {
|
||||
mFlags |= FX_SURFACE_CONTAINER;
|
||||
} else {
|
||||
mFlags &= ~FX_SURFACE_CONTAINER;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set 'Surface creation flags' such as {@link HIDDEN}, {@link SECURE}.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user