@@ -2610,7 +2610,7 @@ bool SurfaceFlinger::updateLayerSnapshots(VsyncId vsyncId, nsecs_t frameTimeNs,
26102610 for (auto & layer : mLayerLifecycleManager .getLayers ()) {
26112611 if (layer->changes .test (frontend::RequestedLayerState::Changes::Created) &&
26122612 layer->bgColorLayer ) {
2613- sp<Layer> bgColorLayer = getFactory ().createEffectLayer (
2613+ sp<Layer> bgColorLayer = getFactory ().createLayer (
26142614 LayerCreationArgs (this , nullptr , layer->name ,
26152615 ISurfaceComposerClient::eFXSurfaceEffect, LayerMetadata (),
26162616 std::make_optional (layer->id ), true ));
@@ -5429,7 +5429,7 @@ status_t SurfaceFlinger::mirrorLayer(const LayerCreationArgs& args,
54295429 mirrorArgs.flags |= ISurfaceComposerClient::eNoColorFill;
54305430 mirrorArgs.mirrorLayerHandle = mirrorFromHandle;
54315431 mirrorArgs.addToRoot = false ;
5432- status_t result = createEffectLayer (mirrorArgs, &outResult.handle , &mirrorLayer);
5432+ status_t result = createLayer (mirrorArgs, &outResult.handle , &mirrorLayer);
54335433 if (result != NO_ERROR) {
54345434 return result;
54355435 }
@@ -5467,7 +5467,7 @@ status_t SurfaceFlinger::mirrorDisplay(DisplayId displayId, const LayerCreationA
54675467 mirrorArgs.flags |= ISurfaceComposerClient::eNoColorFill;
54685468 mirrorArgs.addToRoot = true ;
54695469 mirrorArgs.layerStackToMirror = layerStack;
5470- result = createEffectLayer (mirrorArgs, &outResult.handle , &rootMirrorLayer);
5470+ result = createLayer (mirrorArgs, &outResult.handle , &rootMirrorLayer);
54715471 if (result != NO_ERROR) {
54725472 return result;
54735473 }
@@ -5493,7 +5493,7 @@ status_t SurfaceFlinger::createLayer(LayerCreationArgs& args, gui::CreateSurface
54935493 args.flags |= ISurfaceComposerClient::eNoColorFill;
54945494 [[fallthrough]];
54955495 case ISurfaceComposerClient::eFXSurfaceEffect: {
5496- result = createBufferStateLayer (args, &outResult.handle , &layer);
5496+ result = createLayer (args, &outResult.handle , &layer);
54975497 if (result != NO_ERROR) {
54985498 return result;
54995499 }
@@ -5535,22 +5535,12 @@ status_t SurfaceFlinger::createLayer(LayerCreationArgs& args, gui::CreateSurface
55355535 return result;
55365536}
55375537
5538- status_t SurfaceFlinger::createBufferStateLayer ( LayerCreationArgs& args, sp<IBinder>* handle,
5539- sp<Layer>* outLayer) {
5538+ status_t SurfaceFlinger::createLayer ( const LayerCreationArgs& args, sp<IBinder>* handle,
5539+ sp<Layer>* outLayer) {
55405540 if (checkLayerLeaks () != NO_ERROR) {
55415541 return NO_MEMORY;
55425542 }
5543- *outLayer = getFactory ().createBufferStateLayer (args);
5544- *handle = (*outLayer)->getHandle ();
5545- return NO_ERROR;
5546- }
5547-
5548- status_t SurfaceFlinger::createEffectLayer (const LayerCreationArgs& args, sp<IBinder>* handle,
5549- sp<Layer>* outLayer) {
5550- if (checkLayerLeaks () != NO_ERROR) {
5551- return NO_MEMORY;
5552- }
5553- *outLayer = getFactory ().createEffectLayer (args);
5543+ *outLayer = getFactory ().createLayer (args);
55545544 *handle = (*outLayer)->getHandle ();
55555545 return NO_ERROR;
55565546}
0 commit comments