summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/BufferQueueLayer.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/BufferQueueLayer.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/BufferQueueLayer.cpp')
-rw-r--r--services/surfaceflinger/BufferQueueLayer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/BufferQueueLayer.cpp b/services/surfaceflinger/BufferQueueLayer.cpp
index eb13f658d9..d80a70e4c6 100644
--- a/services/surfaceflinger/BufferQueueLayer.cpp
+++ b/services/surfaceflinger/BufferQueueLayer.cpp
@@ -531,7 +531,7 @@ sp<Layer> BufferQueueLayer::createClone() {
LayerCreationArgs args =
LayerCreationArgs(mFlinger.get(), nullptr, name, 0, 0, 0, LayerMetadata());
args.textureName = mTextureName;
- sp<BufferQueueLayer> layer = new BufferQueueLayer(args);
+ sp<BufferQueueLayer> layer = mFlinger->getFactory().createBufferQueueLayer(args);
layer->setInitialValuesForClone(this);
return layer;