summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2018-12-20 15:11:37 -0800
committer android-build-merger <android-build-merger@google.com> 2018-12-20 15:11:37 -0800
commit049902d9eb86f27026c896dd5d1938747e8a194d (patch)
treeb58c1fef6aa7b4247fb0e6bc1cbed9e95b221c0b
parentb60a7cdc07576acd4e74613f1178b6ceb178cab5 (diff)
parentef7f39f4f50c38ec43fde3d46364ca8fa81c3151 (diff)
Implement construction of container layers am: c1ea10447f
am: ef7f39f4f5 Change-Id: I20c5e72ec3d278a3d9dd36618c45f32f330f72c6
-rw-r--r--core/java/android/view/SurfaceControl.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index 2e98d033fa7f..66f16d57c828 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -268,6 +268,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.
*
*/
@@ -531,6 +538,23 @@ public class SurfaceControl implements Parcelable {
}
/**
+ * 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}.
*
* TODO: Finish conversion to individual builder methods?