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

Commit fd15975a authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge changes I50e3a5e1,Icd043916 into main

* changes:
  Remove use of legacy layers from TransactionApplicationTest
  Remove use of legacy layers from composition test
parents 74ecab53 0a51a879
Loading
Loading
Loading
Loading
+66 −110
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
 */

// TODO(b/129481165): remove the #pragma below and fix conversion issues
#include "renderengine/ExternalTexture.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wextra"
@@ -31,6 +30,7 @@
#include <gui/IProducerListener.h>
#include <gui/LayerMetadata.h>
#include <log/log.h>
#include <renderengine/ExternalTexture.h>
#include <renderengine/mock/FakeExternalTexture.h>
#include <renderengine/mock/RenderEngine.h>
#include <system/window.h>
@@ -114,6 +114,7 @@ public:
        mFlinger.setupComposer(std::unique_ptr<Hwc2::Composer>(mComposer));
        mFlinger.setupPowerAdvisor(std::unique_ptr<Hwc2::PowerAdvisor>(mPowerAdvisor));
        mFlinger.mutableMaxRenderTargetSize() = 16384;
        mFlinger.enableLayerLifecycleManager();
    }

    ~CompositionTest() {
@@ -149,7 +150,6 @@ public:
    sp<compositionengine::mock::DisplaySurface> mDisplaySurface =
            sp<compositionengine::mock::DisplaySurface>::make();
    sp<mock::NativeWindow> mNativeWindow = sp<mock::NativeWindow>::make();
    std::vector<sp<Layer>> mAuxiliaryLayers;

    sp<GraphicBuffer> mBuffer =
            sp<GraphicBuffer>::make(1u, 1u, PIXEL_FORMAT_RGBA_8888,
@@ -194,6 +194,7 @@ void CompositionTest::displayRefreshCompositionDirtyFrame() {
template <typename LayerCase>
void CompositionTest::captureScreenComposition() {
    LayerCase::setupForScreenCapture(this);
    mFlinger.commit();

    const Rect sourceCrop(0, 0, DEFAULT_DISPLAY_WIDTH, DEFAULT_DISPLAY_HEIGHT);
    constexpr bool regionSampling = false;
@@ -204,13 +205,8 @@ void CompositionTest::captureScreenComposition() {
                                      RenderArea::Options::CAPTURE_SECURE_LAYERS |
                                              RenderArea::Options::HINT_FOR_SEAMLESS_TRANSITION);

    auto traverseLayers = [this](const LayerVector::Visitor& visitor) {
        return mFlinger.traverseLayersInLayerStack(mDisplay->getLayerStack(),
                                                   CaptureArgs::UNSET_UID, {}, visitor);
    };

    // TODO: Use SurfaceFlinger::getLayerSnapshotsForScreenshots instead of this legacy function
    auto getLayerSnapshotsFn = RenderArea::fromTraverseLayersLambda(traverseLayers);
    auto getLayerSnapshotsFn = mFlinger.getLayerSnapshotsForScreenshotsFn(mDisplay->getLayerStack(),
                                                                          CaptureArgs::UNSET_UID);

    const uint32_t usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN |
            GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE;
@@ -462,7 +458,7 @@ struct BaseLayerProperties {
    static constexpr IComposerClient::BlendMode BLENDMODE =
            IComposerClient::BlendMode::PREMULTIPLIED;

    static void setupLatchedBuffer(CompositionTest* test, sp<Layer> layer) {
    static void setupLatchedBuffer(CompositionTest* test, frontend::RequestedLayerState& layer) {
        Mock::VerifyAndClear(test->mRenderEngine);

        const auto buffer = std::make_shared<
@@ -472,21 +468,15 @@ struct BaseLayerProperties {
                                                         LayerProperties::FORMAT,
                                                         LayerProperties::USAGE |
                                                                 GraphicBuffer::USAGE_HW_TEXTURE);

        auto& layerDrawingState = test->mFlinger.mutableLayerDrawingState(layer);
        layerDrawingState.crop = Rect(0, 0, LayerProperties::HEIGHT, LayerProperties::WIDTH);
        layerDrawingState.buffer = buffer;
        layerDrawingState.acquireFence = Fence::NO_FENCE;
        layerDrawingState.dataspace = ui::Dataspace::UNKNOWN;
        layer->setSurfaceDamageRegion(
                Region(Rect(LayerProperties::HEIGHT, LayerProperties::WIDTH)));

        bool ignoredRecomputeVisibleRegions;
        layer->latchBuffer(ignoredRecomputeVisibleRegions, 0);
        layer.crop = Rect(0, 0, LayerProperties::HEIGHT, LayerProperties::WIDTH);
        layer.externalTexture = buffer;
        layer.bufferData->acquireFence = Fence::NO_FENCE;
        layer.dataspace = ui::Dataspace::UNKNOWN;
        layer.surfaceDamageRegion = Region(Rect(LayerProperties::HEIGHT, LayerProperties::WIDTH));
        Mock::VerifyAndClear(test->mRenderEngine);
    }

    static void setupLayerState(CompositionTest* test, sp<Layer> layer) {
    static void setupLayerState(CompositionTest* test, frontend::RequestedLayerState& layer) {
        setupLatchedBuffer(test, layer);
    }

@@ -670,14 +660,12 @@ struct SidebandLayerProperties : public BaseLayerProperties<SidebandLayerPropert
    using Base = BaseLayerProperties<SidebandLayerProperties>;
    static constexpr IComposerClient::BlendMode BLENDMODE = IComposerClient::BlendMode::NONE;

    static void setupLayerState(CompositionTest* test, sp<Layer> layer) {
    static void setupLayerState(CompositionTest* test, frontend::RequestedLayerState& layer) {
        sp<NativeHandle> stream =
                NativeHandle::create(reinterpret_cast<native_handle_t*>(DEFAULT_SIDEBAND_STREAM),
                                     false);
        test->mFlinger.setLayerSidebandStream(layer, stream);
        auto& layerDrawingState = test->mFlinger.mutableLayerDrawingState(layer);
        layerDrawingState.crop =
                Rect(0, 0, SidebandLayerProperties::HEIGHT, SidebandLayerProperties::WIDTH);
        layer.sidebandStream = stream;
        layer.crop = Rect(0, 0, SidebandLayerProperties::HEIGHT, SidebandLayerProperties::WIDTH);
    }

    static void setupHwcSetSourceCropBufferCallExpectations(CompositionTest* test) {
@@ -755,17 +743,17 @@ struct SecureLayerProperties : public CommonSecureLayerProperties<SecureLayerPro
struct CursorLayerProperties : public BaseLayerProperties<CursorLayerProperties> {
    using Base = BaseLayerProperties<CursorLayerProperties>;

    static void setupLayerState(CompositionTest* test, sp<Layer> layer) {
    static void setupLayerState(CompositionTest* test, frontend::RequestedLayerState& layer) {
        Base::setupLayerState(test, layer);
        test->mFlinger.setLayerPotentialCursor(layer, true);
        layer.potentialCursor = true;
    }
};

struct NoLayerVariant {
    using FlingerLayerType = sp<Layer>;

    static FlingerLayerType createLayer(CompositionTest*) { return FlingerLayerType(); }
    static void injectLayer(CompositionTest*, FlingerLayerType) {}
    static frontend::RequestedLayerState createLayer(CompositionTest*) {
        return {LayerCreationArgs()};
    }
    static void injectLayer(CompositionTest*, frontend::RequestedLayerState&) {}
    static void cleanupInjectedLayers(CompositionTest*) {}

    static void setupCallExpectationsForDirtyGeometry(CompositionTest*) {}
@@ -775,10 +763,10 @@ struct NoLayerVariant {
template <typename LayerProperties>
struct BaseLayerVariant {
    template <typename L, typename F>
    static sp<L> createLayerWithFactory(CompositionTest* test, F factory) {
    static frontend::RequestedLayerState createLayerWithFactory(CompositionTest* test, F factory) {
        EXPECT_CALL(*test->mFlinger.scheduler(), postMessage(_)).Times(0);

        sp<L> layer = factory();
        auto layer = factory();

        // Layer should be registered with scheduler.
        EXPECT_EQ(1u, test->mFlinger.scheduler()->layerHistorySize());
@@ -792,27 +780,26 @@ struct BaseLayerVariant {
        return layer;
    }

    template <typename L>
    static void initLayerDrawingStateAndComputeBounds(CompositionTest* test, sp<L> layer) {
        auto& layerDrawingState = test->mFlinger.mutableLayerDrawingState(layer);
        layerDrawingState.layerStack = LAYER_STACK;
        layerDrawingState.color = half4(LayerProperties::COLOR[0], LayerProperties::COLOR[1],
    static void initLayerDrawingStateAndComputeBounds(CompositionTest* test,
                                                      frontend::RequestedLayerState& layer) {
        layer.layerStack = LAYER_STACK;
        layer.color = half4(LayerProperties::COLOR[0], LayerProperties::COLOR[1],
                            LayerProperties::COLOR[2], LayerProperties::COLOR[3]);
        layer->computeBounds(FloatRect(0, 0, 100, 100), ui::Transform(), 0.f /* shadowRadius */);
    }

    static void injectLayer(CompositionTest* test, sp<Layer> layer) {
    static void injectLayer(CompositionTest* test, frontend::RequestedLayerState& layer) {
        EXPECT_CALL(*test->mComposer, createLayer(HWC_DISPLAY, _))
                .WillOnce(DoAll(SetArgPointee<1>(HWC_LAYER), Return(Error::NONE)));

        auto legacyLayer = test->mFlinger.getLegacyLayer(layer.id);
        auto outputLayer = test->mDisplay->getCompositionDisplay()->injectOutputLayerForTest(
                layer->getCompositionEngineLayerFE());
                legacyLayer->getCompositionEngineLayerFE({.id = layer.id}));
        outputLayer->editState().visibleRegion = Region(Rect(0, 0, 100, 100));
        outputLayer->editState().outputSpaceVisibleRegion = Region(Rect(0, 0, 100, 100));

        Mock::VerifyAndClear(test->mComposer);

        test->mFlinger.mutableDrawingState().layersSortedByZ.add(layer);
        auto layerCopy = std::make_unique<frontend::RequestedLayerState>(layer);
        test->mFlinger.addLayer(layerCopy);
        test->mFlinger.mutableVisibleRegionsDirty() = true;
    }

@@ -820,10 +807,9 @@ struct BaseLayerVariant {
        EXPECT_CALL(*test->mComposer, destroyLayer(HWC_DISPLAY, HWC_LAYER))
                .WillOnce(Return(Error::NONE));

        test->mFlinger.destroyAllLayerHandles();
        test->mDisplay->getCompositionDisplay()->clearOutputLayers();
        test->mFlinger.mutableDrawingState().layersSortedByZ.clear();
        test->mFlinger.mutablePreviouslyComposedLayers().clear();

        // Layer should be unregistered with scheduler.
        test->mFlinger.commit();
        EXPECT_EQ(0u, test->mFlinger.scheduler()->layerHistorySize());
@@ -833,17 +819,17 @@ struct BaseLayerVariant {
template <typename LayerProperties>
struct EffectLayerVariant : public BaseLayerVariant<LayerProperties> {
    using Base = BaseLayerVariant<LayerProperties>;
    using FlingerLayerType = sp<Layer>;

    static FlingerLayerType createLayer(CompositionTest* test) {
        FlingerLayerType layer = Base::template createLayerWithFactory<Layer>(test, [test]() {
            return sp<Layer>::make(LayerCreationArgs(test->mFlinger.flinger(), sp<Client>(),
                                                     "test-layer", LayerProperties::LAYER_FLAGS,
                                                     LayerMetadata()));
    static frontend::RequestedLayerState createLayer(CompositionTest* test) {
        frontend::RequestedLayerState layer = Base::template createLayerWithFactory<
                frontend::RequestedLayerState>(test, [test]() {
            auto args = LayerCreationArgs(test->mFlinger.flinger(), sp<Client>(), "test-layer",
                                          LayerProperties::LAYER_FLAGS, LayerMetadata());
            auto legacyLayer = sp<Layer>::make(args);
            test->mFlinger.injectLegacyLayer(legacyLayer);
            return frontend::RequestedLayerState(args);
        });

        auto& layerDrawingState = test->mFlinger.mutableLayerDrawingState(layer);
        layerDrawingState.crop = Rect(0, 0, LayerProperties::HEIGHT, LayerProperties::WIDTH);
        layer.crop = Rect(0, 0, LayerProperties::HEIGHT, LayerProperties::WIDTH);
        return layer;
    }

@@ -869,13 +855,15 @@ struct EffectLayerVariant : public BaseLayerVariant<LayerProperties> {
template <typename LayerProperties>
struct BufferLayerVariant : public BaseLayerVariant<LayerProperties> {
    using Base = BaseLayerVariant<LayerProperties>;
    using FlingerLayerType = sp<Layer>;

    static FlingerLayerType createLayer(CompositionTest* test) {
        FlingerLayerType layer = Base::template createLayerWithFactory<Layer>(test, [test]() {
    static frontend::RequestedLayerState createLayer(CompositionTest* test) {
        frontend::RequestedLayerState layer = Base::template createLayerWithFactory<
                frontend::RequestedLayerState>(test, [test]() {
            LayerCreationArgs args(test->mFlinger.flinger(), sp<Client>(), "test-layer",
                                   LayerProperties::LAYER_FLAGS, LayerMetadata());
            return sp<Layer>::make(args);
            auto legacyLayer = sp<Layer>::make(args);
            test->mFlinger.injectLegacyLayer(legacyLayer);
            return frontend::RequestedLayerState(args);
        });

        LayerProperties::setupLayerState(test, layer);
@@ -917,13 +905,14 @@ struct BufferLayerVariant : public BaseLayerVariant<LayerProperties> {
template <typename LayerProperties>
struct ContainerLayerVariant : public BaseLayerVariant<LayerProperties> {
    using Base = BaseLayerVariant<LayerProperties>;
    using FlingerLayerType = sp<Layer>;

    static FlingerLayerType createLayer(CompositionTest* test) {
    static frontend::RequestedLayerState createLayer(CompositionTest* test) {
        LayerCreationArgs args(test->mFlinger.flinger(), sp<Client>(), "test-container-layer",
                               LayerProperties::LAYER_FLAGS, LayerMetadata());
        FlingerLayerType layer = sp<Layer>::make(args);
        Base::template initLayerDrawingStateAndComputeBounds(test, layer);
        sp<Layer> legacyLayer = sp<Layer>::make(args);
        test->mFlinger.injectLegacyLayer(legacyLayer);
        frontend::RequestedLayerState layer(args);
        Base::initLayerDrawingStateAndComputeBounds(test, layer);
        return layer;
    }
};
@@ -931,29 +920,19 @@ struct ContainerLayerVariant : public BaseLayerVariant<LayerProperties> {
template <typename LayerVariant, typename ParentLayerVariant>
struct ChildLayerVariant : public LayerVariant {
    using Base = LayerVariant;
    using FlingerLayerType = typename LayerVariant::FlingerLayerType;
    using ParentBase = ParentLayerVariant;

    static FlingerLayerType createLayer(CompositionTest* test) {
    static frontend::RequestedLayerState createLayer(CompositionTest* test) {
        // Need to create child layer first. Otherwise layer history size will be 2.
        FlingerLayerType layer = Base::createLayer(test);

        typename ParentBase::FlingerLayerType parentLayer = ParentBase::createLayer(test);
        parentLayer->addChild(layer);
        test->mFlinger.setLayerDrawingParent(layer, parentLayer);

        test->mAuxiliaryLayers.push_back(parentLayer);

        frontend::RequestedLayerState layer = Base::createLayer(test);
        frontend::RequestedLayerState parentLayer = ParentBase::createLayer(test);
        layer.parentId = parentLayer.id;
        auto layerCopy = std::make_unique<frontend::RequestedLayerState>(parentLayer);
        test->mFlinger.addLayer(layerCopy);
        return layer;
    }

    static void cleanupInjectedLayers(CompositionTest* test) {
        // Clear auxiliary layers first so that child layer can be successfully destroyed in the
        // following call.
        test->mAuxiliaryLayers.clear();

        Base::cleanupInjectedLayers(test);
    }
    static void cleanupInjectedLayers(CompositionTest* test) { Base::cleanupInjectedLayers(test); }
};

/* ------------------------------------------------------------------------
@@ -1016,7 +995,7 @@ struct ChangeCompositionTypeVariant {
 */

struct CompositionResultBaseVariant {
    static void setupLayerState(CompositionTest*, sp<Layer>) {}
    static void setupLayerState(CompositionTest*, frontend::RequestedLayerState&) {}

    template <typename Case>
    static void setupCallExpectationsForDirtyGeometry(CompositionTest* test) {
@@ -1056,9 +1035,8 @@ struct RECompositionResultVariant : public CompositionResultBaseVariant {
};

struct ForcedClientCompositionResultVariant : public CompositionResultBaseVariant {
    static void setupLayerState(CompositionTest* test, sp<Layer> layer) {
        const auto outputLayer =
                TestableSurfaceFlinger::findOutputLayerForDisplay(layer, test->mDisplay);
    static void setupLayerState(CompositionTest* test, frontend::RequestedLayerState& layer) {
        const auto outputLayer = test->mFlinger.findOutputLayerForDisplay(layer.id, test->mDisplay);
        LOG_FATAL_IF(!outputLayer);
        outputLayer->editState().forceClientComposition = true;
    }
@@ -1079,7 +1057,7 @@ struct ForcedClientCompositionResultVariant : public CompositionResultBaseVarian
};

struct ForcedClientCompositionViaDebugOptionResultVariant : public CompositionResultBaseVariant {
    static void setupLayerState(CompositionTest* test, sp<Layer>) {
    static void setupLayerState(CompositionTest* test, frontend::RequestedLayerState&) {
        test->mFlinger.mutableDebugDisableHWC() = true;
    }

@@ -1099,7 +1077,7 @@ struct ForcedClientCompositionViaDebugOptionResultVariant : public CompositionRe
};

struct EmptyScreenshotResultVariant {
    static void setupLayerState(CompositionTest*, sp<Layer>) {}
    static void setupLayerState(CompositionTest*, frontend::RequestedLayerState&) {}

    template <typename Case>
    static void setupCallExpectations(CompositionTest*) {}
@@ -1365,28 +1343,6 @@ TEST_F(CompositionTest, captureScreenSecureBufferLayerOnInsecureDisplay) {
 *  Layers with a parent layer with ISurfaceComposerClient::eSecure, on a non-secure display
 */

TEST_F(CompositionTest,
       HWCComposedBufferLayerWithSecureParentLayerOnInsecureDisplayWithDirtyGeometry) {
    displayRefreshCompositionDirtyGeometry<CompositionCase<
            InsecureDisplaySetupVariant,
            ChildLayerVariant<BufferLayerVariant<ParentSecureLayerProperties>,
                              ContainerLayerVariant<SecureLayerProperties>>,
            KeepCompositionTypeVariant<
                    aidl::android::hardware::graphics::composer3::Composition::CLIENT>,
            ForcedClientCompositionResultVariant>>();
}

TEST_F(CompositionTest,
       HWCComposedBufferLayerWithSecureParentLayerOnInsecureDisplayWithDirtyFrame) {
    displayRefreshCompositionDirtyFrame<CompositionCase<
            InsecureDisplaySetupVariant,
            ChildLayerVariant<BufferLayerVariant<ParentSecureLayerProperties>,
                              ContainerLayerVariant<SecureLayerProperties>>,
            KeepCompositionTypeVariant<
                    aidl::android::hardware::graphics::composer3::Composition::CLIENT>,
            ForcedClientCompositionResultVariant>>();
}

TEST_F(CompositionTest, captureScreenBufferLayerWithSecureParentLayerOnInsecureDisplay) {
    captureScreenComposition<
            CompositionCase<InsecureDisplaySetupVariant,
+38 −14
Original line number Diff line number Diff line
@@ -326,9 +326,13 @@ public:

    auto& mutableStateLock() { return mFlinger->mStateLock; }

    static auto findOutputLayerForDisplay(const sp<Layer>& layer,
                                          const sp<const DisplayDevice>& display) {
        return layer->findOutputLayerForDisplay(display.get());
    compositionengine::OutputLayer* findOutputLayerForDisplay(
            uint32_t layerId, const sp<const DisplayDevice>& display) {
        ftl::FakeGuard guard(kMainThreadContext);
        if (mFlinger->mLegacyLayers.find(layerId) == mFlinger->mLegacyLayers.end()) {
            return nullptr;
        }
        return mFlinger->mLegacyLayers[layerId]->findOutputLayerForDisplay(display.get());
    }

    static void setLayerSidebandStream(const sp<Layer>& layer,
@@ -340,17 +344,14 @@ public:

    void setLayerCompositionType(const sp<Layer>& layer,
                                 aidl::android::hardware::graphics::composer3::Composition type) {
        auto outputLayer = findOutputLayerForDisplay(layer, mFlinger->getDefaultDisplayDevice());
        auto outputLayer = findOutputLayerForDisplay(static_cast<uint32_t>(layer->sequence),
                                                     mFlinger->getDefaultDisplayDevice());
        LOG_ALWAYS_FATAL_IF(!outputLayer);
        auto& state = outputLayer->editState();
        LOG_ALWAYS_FATAL_IF(!outputLayer->getState().hwc);
        (*state.hwc).hwcCompositionType = type;
    }

    static void setLayerPotentialCursor(const sp<Layer>& layer, bool potentialCursor) {
        layer->mPotentialCursor = potentialCursor;
    }

    static void setLayerDrawingParent(const sp<Layer>& layer, const sp<Layer>& drawingParent) {
        layer->mDrawingParent = drawingParent;
    }
@@ -395,7 +396,7 @@ public:
            targets.try_emplace(id, &frameTargeter.target());
            targeters.try_emplace(id, &frameTargeter);
        }

        mFlinger->setTransactionFlags(eTransactionFlushNeeded);
        mFlinger->commit(displayId, targets);

        if (composite) {
@@ -505,10 +506,9 @@ public:
                                          captureResults, displayState, layers, layerFEs);
    }

    auto traverseLayersInLayerStack(ui::LayerStack layerStack, int32_t uid,
                                    std::unordered_set<uint32_t> excludeLayerIds,
                                    const LayerVector::Visitor& visitor) {
        return mFlinger->traverseLayersInLayerStack(layerStack, uid, excludeLayerIds, visitor);
    auto getLayerSnapshotsForScreenshotsFn(ui::LayerStack layerStack, uint32_t uid) {
        return mFlinger->getLayerSnapshotsForScreenshots(layerStack, uid,
                                                         std::unordered_set<uint32_t>{});
    }

    auto getDisplayNativePrimaries(const sp<IBinder>& displayToken,
@@ -620,6 +620,18 @@ public:
        mFlinger->mNewLayers.emplace_back(std::move(layer));
    }

    // Used to add a layer before updateLayerSnapshots is called.
    // Must have transactionsFlushed enabled for the new layer to be updated.
    void addLayer(uint32_t layerId) {
        std::scoped_lock<std::mutex> lock(mFlinger->mCreatedLayersLock);
        LayerCreationArgs args(std::make_optional(layerId));
        args.flinger = this->mFlinger.get();
        auto layer = std::make_unique<frontend::RequestedLayerState>(args);
        auto legacyLayer = sp<Layer>::make(args);
        injectLegacyLayer(legacyLayer);
        mFlinger->mNewLayers.emplace_back(std::move(layer));
    }

    /* ------------------------------------------------------------------------
     * Read-only access to private data to assert post-conditions.
     */
@@ -637,12 +649,24 @@ public:
    void injectLegacyLayer(sp<Layer> layer) {
        FTL_FAKE_GUARD(kMainThreadContext,
                       mFlinger->mLegacyLayers[static_cast<uint32_t>(layer->sequence)] = layer);
    };
    }

    void releaseLegacyLayer(uint32_t sequence) {
        FTL_FAKE_GUARD(kMainThreadContext, mFlinger->mLegacyLayers.erase(sequence));
    }

    auto getLegacyLayer(uint32_t layerId) {
        ftl::FakeGuard guard(kMainThreadContext);
        return mFlinger->mLegacyLayers[layerId];
    };

    void destroyAllLayerHandles() {
        ftl::FakeGuard guard(kMainThreadContext);
        for (auto [layerId, legacyLayer] : mFlinger->mLegacyLayers) {
            mFlinger->onHandleDestroyed(nullptr, legacyLayer, layerId);
        }
    }

    auto setLayerHistoryDisplayArea(uint32_t displayArea) {
        return mFlinger->mScheduler->onActiveDisplayAreaChanged(displayArea);
    };
+30 −14

File changed.

Preview size limit exceeded, changes collapsed.