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

Commit fa247b18 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Rename ColorLayer to EffectLayer to handle both shadows and color fill

We want the ability for a layer to render shadows without any content.
This new layer type will be able to combine effects as needed.

Test: presubmit tests (no functional changes)
Test: go/wm-smoke
Change-Id: I8663d126a23263a3d7dc799d39a9cf44b3b6e4a0
parent 44da2976
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ public:
        eCursorWindow = 0x00002000,

        eFXSurfaceBufferQueue = 0x00000000,
        eFXSurfaceColor = 0x00020000,
        eFXSurfaceEffect = 0x00020000,
        eFXSurfaceBufferState = 0x00040000,
        eFXSurfaceContainer = 0x00080000,
        eFXSurfaceMask = 0x000F0000,
+1 −1
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ TEST_F(BLASTBufferQueueTest, SetCrop_ScalingModeScaleCrop) {
    int32_t finalCropSideLength = bufferSideLength / 2;

    auto bg = mClient->createSurface(String8("BGTest"), 0, 0, PIXEL_FORMAT_RGBA_8888,
                                     ISurfaceComposerClient::eFXSurfaceColor);
                                     ISurfaceComposerClient::eFXSurfaceEffect);
    ASSERT_NE(nullptr, bg.get());
    Transaction t;
    t.setLayerStack(bg, 0)
+2 −1
Original line number Diff line number Diff line
@@ -82,7 +82,8 @@ public:
                                                               int width, int height) {
        sp<SurfaceControl> surfaceControl =
                scc->createSurface(String8("Test Surface"), 0 /* bufHeight */, 0 /* bufWidth */,
                                   PIXEL_FORMAT_RGBA_8888, ISurfaceComposerClient::eFXSurfaceColor);
                                   PIXEL_FORMAT_RGBA_8888,
                                   ISurfaceComposerClient::eFXSurfaceEffect);
        return std::make_unique<InputSurface>(surfaceControl, width, height);
    }

+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ protected:
        mBackgroundLayer =
                mSurfaceComposerClient->createSurface(String8("Background RegionSamplingTest"), 0,
                                                      0, PIXEL_FORMAT_RGBA_8888,
                                                      ISurfaceComposerClient::eFXSurfaceColor);
                                                      ISurfaceComposerClient::eFXSurfaceEffect);
        uint32_t layerPositionBottom = 0x7E000000;
        SurfaceComposerClient::Transaction{}
                .setLayer(mBackgroundLayer, layerPositionBottom)
+3 −3
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ public:
        sp<SurfaceComposerClient> client = new SurfaceComposerClient;

        mButton = client->createSurface(String8(name), 0, 0, PIXEL_FORMAT_RGBA_8888,
                                        ISurfaceComposerClient::eFXSurfaceColor);
                                        ISurfaceComposerClient::eFXSurfaceEffect);

        const int32_t width = samplingArea.getWidth();
        const int32_t height = samplingArea.getHeight();
@@ -55,7 +55,7 @@ public:
                .apply();

        mButtonBlend = client->createSurface(String8(name) + "Blend", 0, 0, PIXEL_FORMAT_RGBA_8888,
                                             ISurfaceComposerClient::eFXSurfaceColor);
                                             ISurfaceComposerClient::eFXSurfaceEffect);

        SurfaceComposerClient::Transaction{}
                .setLayer(mButtonBlend, 0x7ffffffe)
@@ -73,7 +73,7 @@ public:
        if (HIGHLIGHT_SAMPLING_AREA) {
            mSamplingArea =
                    client->createSurface(String8("SamplingArea"), 0, 0, PIXEL_FORMAT_RGBA_8888,
                                          ISurfaceComposerClient::eFXSurfaceColor);
                                          ISurfaceComposerClient::eFXSurfaceEffect);

            SurfaceComposerClient::Transaction{}
                    .setLayer(mSamplingArea, 0x7ffffffd)
Loading