Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 958be49b authored by Lloyd Pique's avatar Lloyd Pique
Browse files

SF: Update Layer::setBackgroundColor to use the factory interface

Rather than directly creating a ColorLayer, use the factory interface to
do so.  This allows an override to be created instead if desired.

Test: atest CtsViewTestCases
Test: go/wm-smoke
Bug: 121291683
Change-Id: I53f65f482bc896cb54857d6f268c550fd173f6ff
parent 9755fb75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -989,7 +989,7 @@ bool Layer::setBackgroundColor(const half3& color, float alpha, ui::Dataspace da
        // create background color layer if one does not yet exist
        uint32_t flags = ISurfaceComposerClient::eFXSurfaceColor;
        const String8& name = mName + "BackgroundColorLayer";
        mCurrentState.bgColorLayer = new ColorLayer(
        mCurrentState.bgColorLayer = mFlinger->getFactory().createColorLayer(
                LayerCreationArgs(mFlinger.get(), nullptr, name, 0, 0, flags, LayerMetadata()));

        // add to child list