@@ -2609,7 +2609,7 @@ bool SurfaceFlinger::updateLayerSnapshots(VsyncId vsyncId, nsecs_t frameTimeNs,
26092609 for (auto & layer : mLayerLifecycleManager .getLayers ()) {
26102610 if (layer->changes .test (frontend::RequestedLayerState::Changes::Created) &&
26112611 layer->bgColorLayer ) {
2612- sp<Layer> bgColorLayer = getFactory ().createEffectLayer (
2612+ sp<Layer> bgColorLayer = getFactory ().createLayer (
26132613 LayerCreationArgs (this , nullptr , layer->name ,
26142614 ISurfaceComposerClient::eFXSurfaceEffect, LayerMetadata (),
26152615 std::make_optional (layer->id ), true ));
@@ -5428,7 +5428,7 @@ status_t SurfaceFlinger::mirrorLayer(const LayerCreationArgs& args,
54285428 mirrorArgs.flags |= ISurfaceComposerClient::eNoColorFill;
54295429 mirrorArgs.mirrorLayerHandle = mirrorFromHandle;
54305430 mirrorArgs.addToRoot = false ;
5431- status_t result = createEffectLayer (mirrorArgs, &outResult.handle , &mirrorLayer);
5431+ status_t result = createLayer (mirrorArgs, &outResult.handle , &mirrorLayer);
54325432 if (result != NO_ERROR) {
54335433 return result;
54345434 }
@@ -5466,7 +5466,7 @@ status_t SurfaceFlinger::mirrorDisplay(DisplayId displayId, const LayerCreationA
54665466 mirrorArgs.flags |= ISurfaceComposerClient::eNoColorFill;
54675467 mirrorArgs.addToRoot = true ;
54685468 mirrorArgs.layerStackToMirror = layerStack;
5469- result = createEffectLayer (mirrorArgs, &outResult.handle , &rootMirrorLayer);
5469+ result = createLayer (mirrorArgs, &outResult.handle , &rootMirrorLayer);
54705470 if (result != NO_ERROR) {
54715471 return result;
54725472 }
@@ -5492,7 +5492,7 @@ status_t SurfaceFlinger::createLayer(LayerCreationArgs& args, gui::CreateSurface
54925492 args.flags |= ISurfaceComposerClient::eNoColorFill;
54935493 [[fallthrough]];
54945494 case ISurfaceComposerClient::eFXSurfaceEffect: {
5495- result = createBufferStateLayer (args, &outResult.handle , &layer);
5495+ result = createLayer (args, &outResult.handle , &layer);
54965496 if (result != NO_ERROR) {
54975497 return result;
54985498 }
@@ -5534,22 +5534,12 @@ status_t SurfaceFlinger::createLayer(LayerCreationArgs& args, gui::CreateSurface
55345534 return result;
55355535}
55365536
5537- status_t SurfaceFlinger::createBufferStateLayer ( LayerCreationArgs& args, sp<IBinder>* handle,
5538- sp<Layer>* outLayer) {
5537+ status_t SurfaceFlinger::createLayer ( const LayerCreationArgs& args, sp<IBinder>* handle,
5538+ sp<Layer>* outLayer) {
55395539 if (checkLayerLeaks () != NO_ERROR) {
55405540 return NO_MEMORY;
55415541 }
5542- *outLayer = getFactory ().createBufferStateLayer (args);
5543- *handle = (*outLayer)->getHandle ();
5544- return NO_ERROR;
5545- }
5546-
5547- status_t SurfaceFlinger::createEffectLayer (const LayerCreationArgs& args, sp<IBinder>* handle,
5548- sp<Layer>* outLayer) {
5549- if (checkLayerLeaks () != NO_ERROR) {
5550- return NO_MEMORY;
5551- }
5552- *outLayer = getFactory ().createEffectLayer (args);
5542+ *outLayer = getFactory ().createLayer (args);
55535543 *handle = (*outLayer)->getHandle ();
55545544 return NO_ERROR;
55555545}
0 commit comments