summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/ContainerLayer.cpp
diff options
context:
space:
mode:
author Lloyd Pique <lpique@google.com> 2019-10-03 13:07:08 -0700
committer Lloyd Pique <lpique@google.com> 2019-10-03 14:55:41 -0700
commit1c3a5eb0a4adb44adce52ea4a7b2005d18dc86e6 (patch)
tree659ecb76d084736071b5fd1b65c5d6d5b321f458 /services/surfaceflinger/ContainerLayer.cpp
parentadca95f855679413b02d78f6e2927cd8cbdff8be (diff)
SF: Switch Layer::createClone to using the factory
Using the factory ensures the intended actual types are used for the clone. Test: atest libsurfaceflinger_unittest Test: go/wm_smoke Bug: None Change-Id: I64138724aed2d8c61dc5d59bba247d132291da0c
Diffstat (limited to 'services/surfaceflinger/ContainerLayer.cpp')
-rw-r--r--services/surfaceflinger/ContainerLayer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/ContainerLayer.cpp b/services/surfaceflinger/ContainerLayer.cpp
index cb50d9ff6d..e58e6f425e 100644
--- a/services/surfaceflinger/ContainerLayer.cpp
+++ b/services/surfaceflinger/ContainerLayer.cpp
@@ -32,7 +32,7 @@ bool ContainerLayer::isVisible() const {
sp<Layer> ContainerLayer::createClone() {
String8 name = mName + " (Mirror)";
- sp<ContainerLayer> layer = new ContainerLayer(
+ sp<ContainerLayer> layer = mFlinger->getFactory().createContainerLayer(
LayerCreationArgs(mFlinger.get(), nullptr, name, 0, 0, 0, LayerMetadata()));
layer->setInitialValuesForClone(this);
return layer;