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

Commit fa8fd6b1 authored by Lloyd Pique's avatar Lloyd Pique
Browse files

SF: Remove LayerBE

There was nothing important left. Everything is now done by the classes
in CompositionEngine.

Test: atest libsurfaceflinger_unittest libcompositionengine_test
Bug: 121291683
Change-Id: I7c51f161ccb53ff3456fbef9df2a5bee0501de05
parent cb54b3b7
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -134,7 +134,6 @@ filegroup {
        "EventLog/EventLog.cpp",
        "FrameTracker.cpp",
        "Layer.cpp",
        "LayerBE.cpp",
        "LayerProtoHelper.cpp",
        "LayerRejecter.cpp",
        "LayerStats.cpp",
+0 −1
Original line number Diff line number Diff line
@@ -199,7 +199,6 @@ bool BufferQueueLayer::latchSidebandStream(bool& recomputeVisibleRegions) {
    bool sidebandStreamChanged = true;
    if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false)) {
        // mSidebandStreamChanged was changed to false
        // replicated in LayerBE until FE/BE is ready to be synchronized
        auto& layerCompositionState = getCompositionLayer()->editState().frontEnd;
        layerCompositionState.sidebandStream = mConsumer->getSidebandStream();
        if (layerCompositionState.sidebandStream != nullptr) {
+1 −4
Original line number Diff line number Diff line
@@ -69,10 +69,7 @@ using base::StringAppendF;
std::atomic<int32_t> Layer::sSequence{1};

Layer::Layer(const LayerCreationArgs& args)
      : mFlinger(args.flinger),
        mName(args.name),
        mClientRef(args.client),
        mBE{this, args.name.string()} {
      : mFlinger(args.flinger), mName(args.name), mClientRef(args.client) {
    mCurrentCrop.makeInvalid();

    uint32_t layerFlags = 0;
+0 −7
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@

#include "Client.h"
#include "FrameTracker.h"
#include "LayerBE.h"
#include "LayerVector.h"
#include "MonitoredProducer.h"
#include "SurfaceFlinger.h"
@@ -67,7 +66,6 @@ class DisplayDevice;
class GraphicBuffer;
class SurfaceFlinger;
class LayerDebugInfo;
class LayerBE;

namespace compositionengine {
class Layer;
@@ -97,9 +95,6 @@ class Layer : public virtual compositionengine::LayerFE {
    static std::atomic<int32_t> sSequence;

public:
    friend class LayerBE;
    LayerBE& getBE() { return mBE; }
    LayerBE& getBE() const { return mBE; }
    mutable bool contentDirty{false};
    // regions below are in window-manager space
    Region visibleRegion;
@@ -860,8 +855,6 @@ protected:
    wp<Layer> mCurrentParent;
    wp<Layer> mDrawingParent;

    mutable LayerBE mBE;

    // Can only be accessed with the SF state lock held.
    bool mLayerDetached{false};
    // Can only be accessed with the SF state lock held.
+0 −40
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#define LOG_NDEBUG 0
#undef LOG_TAG
#define LOG_TAG "LayerBE"
#define ATRACE_TAG ATRACE_TAG_GRAPHICS

#include "Layer.h"

namespace android {

LayerBE::LayerBE(Layer* layer, std::string layerName) : mLayer(layer) {
    compositionInfo.layer = std::make_shared<LayerBE>(*this);
    compositionInfo.layerName = layerName;
}

LayerBE::LayerBE(const LayerBE& layer) : mLayer(layer.mLayer) {
    compositionInfo.layer = layer.compositionInfo.layer;
    compositionInfo.layerName = layer.mLayer->getName().string();
}

void LayerBE::onLayerDisplayed(const sp<Fence>& releaseFence) {
    mLayer->onLayerDisplayed(releaseFence);
}

}; // namespace android
Loading