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

Commit dfae9c18 authored by Alec Mouri's avatar Alec Mouri Committed by Automerger Merge Worker
Browse files

Merge "Add output dataspace to CachedSet rendering" into sc-dev am: 7905c2cb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/13857876

Change-Id: I399b03117de59867c04dd681bf65e65908f15ff0
parents d4a833aa 7905c2cb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ struct OutputLayerCompositionState {
        sp<GraphicBuffer> buffer = nullptr;
        sp<Fence> acquireFence = nullptr;
        Rect displayFrame = {};
        ui::Dataspace dataspace{ui::Dataspace::UNKNOWN};
    } overrideInfo;

    /*
+5 −1
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ public:
    size_t getAge() const { return mAge; }
    const sp<GraphicBuffer>& getBuffer() const { return mTexture.getBuffer(); }
    const sp<Fence>& getDrawFence() const { return mDrawFence; }
    ui::Dataspace getOutputDataspace() const { return mOutputDataspace; }

    NonBufferHash getNonBufferHash() const;

@@ -80,6 +81,7 @@ public:
    void setLastUpdate(std::chrono::steady_clock::time_point now) { mLastUpdate = now; }
    void append(const CachedSet& other) {
        mTexture.setBuffer(nullptr, nullptr);
        mOutputDataspace = ui::Dataspace::UNKNOWN;
        mDrawFence = nullptr;

        mLayers.insert(mLayers.end(), other.mLayers.cbegin(), other.mLayers.cend());
@@ -90,7 +92,8 @@ public:
    }
    void incrementAge() { ++mAge; }

    void render(renderengine::RenderEngine&);
    // Renders the cached set with the supplied output dataspace.
    void render(renderengine::RenderEngine&, ui::Dataspace outputDataspace);

    void dump(std::string& result) const;

@@ -129,6 +132,7 @@ private:

    Texture mTexture;
    sp<Fence> mDrawFence;
    ui::Dataspace mOutputDataspace;

    static const bool sDebugHighlighLayers;
};
+2 −1
Original line number Diff line number Diff line
@@ -42,7 +42,8 @@ public:
    NonBufferHash flattenLayers(const std::vector<const LayerState*>& layers, NonBufferHash,
                                std::chrono::steady_clock::time_point now);

    void renderCachedSets(renderengine::RenderEngine&);
    // Renders the newest cached sets with the supplied output dataspace
    void renderCachedSets(renderengine::RenderEngine&, ui::Dataspace outputDataspace);

    void reset();

+3 −3
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ private:
                           }};

    using DataspaceState = OutputLayerState<ui::Dataspace, LayerStateField::Dataspace>;
    DataspaceState mDataspace{[](auto layer) { return layer->getState().dataspace; },
    DataspaceState mOutputDataspace{[](auto layer) { return layer->getState().dataspace; },
                                    DataspaceState::getHalToStrings()};

    // TODO(b/180638831): Buffer format
@@ -341,7 +341,7 @@ private:
    std::array<const StateInterface*, 13> getNonUniqueFields() const {
        return {
                &mDisplayFrame,   &mSourceCrop,      &mZOrder,         &mBufferTransform,
                &mBlendMode,      &mAlpha,           &mVisibleRegion,  &mDataspace,
                &mBlendMode,      &mAlpha,           &mVisibleRegion,  &mOutputDataspace,
                &mColorTransform, &mCompositionType, &mSidebandStream, &mBuffer,
                &mSolidColor,
        };
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ public:
            compositionengine::Output::OutputLayersEnumerator<compositionengine::Output>&& layers);

    // The planner will call to the Flattener to render any pending cached set
    void renderCachedSets(renderengine::RenderEngine&);
    void renderCachedSets(renderengine::RenderEngine&, ui::Dataspace outputDataspace);

    void dump(const Vector<String16>& args, std::string&);

Loading