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

Commit d1fe5d34 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I7c51f161,I9231f4b4

* changes:
  SF: Remove LayerBE
  SF: Refactor onLayerDisplayed
parents d20dbdb7 fa8fd6b1
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -134,7 +134,6 @@ filegroup {
        "EventLog/EventLog.cpp",
        "EventLog/EventLog.cpp",
        "FrameTracker.cpp",
        "FrameTracker.cpp",
        "Layer.cpp",
        "Layer.cpp",
        "LayerBE.cpp",
        "LayerProtoHelper.cpp",
        "LayerProtoHelper.cpp",
        "LayerRejecter.cpp",
        "LayerRejecter.cpp",
        "LayerStats.cpp",
        "LayerStats.cpp",
+0 −1
Original line number Original line Diff line number Diff line
@@ -199,7 +199,6 @@ bool BufferQueueLayer::latchSidebandStream(bool& recomputeVisibleRegions) {
    bool sidebandStreamChanged = true;
    bool sidebandStreamChanged = true;
    if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false)) {
    if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false)) {
        // mSidebandStreamChanged was changed to false
        // mSidebandStreamChanged was changed to false
        // replicated in LayerBE until FE/BE is ready to be synchronized
        auto& layerCompositionState = getCompositionLayer()->editState().frontEnd;
        auto& layerCompositionState = getCompositionLayer()->editState().frontEnd;
        layerCompositionState.sidebandStream = mConsumer->getSidebandStream();
        layerCompositionState.sidebandStream = mConsumer->getSidebandStream();
        if (layerCompositionState.sidebandStream != nullptr) {
        if (layerCompositionState.sidebandStream != nullptr) {
+12 −3
Original line number Original line Diff line number Diff line
@@ -18,10 +18,19 @@


#include <utils/RefBase.h>
#include <utils/RefBase.h>


namespace android::compositionengine {
namespace android {

class Fence;

namespace compositionengine {


// Defines the interface used by the CompositionEngine to make requests
// Defines the interface used by the CompositionEngine to make requests
// of the front-end layer
// of the front-end layer
class LayerFE : public virtual RefBase {};
class LayerFE : public virtual RefBase {
public:
    // Called after the layer is displayed to update the presentation fence
    virtual void onLayerDisplayed(const sp<Fence>&) = 0;
};


} // namespace android::compositionengine
} // namespace compositionengine
} // namespace android
+3 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@


#include <compositionengine/LayerFE.h>
#include <compositionengine/LayerFE.h>
#include <gmock/gmock.h>
#include <gmock/gmock.h>
#include <ui/Fence.h>


namespace android::compositionengine::mock {
namespace android::compositionengine::mock {


@@ -27,6 +28,8 @@ class LayerFE : public compositionengine::LayerFE {
public:
public:
    LayerFE();
    LayerFE();
    virtual ~LayerFE();
    virtual ~LayerFE();

    MOCK_METHOD1(onLayerDisplayed, void(const sp<Fence>&));
};
};


} // namespace android::compositionengine::mock
} // namespace android::compositionengine::mock
+1 −4
Original line number Original line Diff line number Diff line
@@ -69,10 +69,7 @@ using base::StringAppendF;
std::atomic<int32_t> Layer::sSequence{1};
std::atomic<int32_t> Layer::sSequence{1};


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


    uint32_t layerFlags = 0;
    uint32_t layerFlags = 0;
Loading