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

Commit 6368475d authored by Huihong Luo's avatar Huihong Luo Committed by Android (Google) Code Review
Browse files

Merge "Add display orientation to CachedSet rendering" into sc-dev

parents 2cb972ec a5825113
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#pragma once

#include <compositionengine/Output.h>
#include <compositionengine/ProjectionSpace.h>
#include <compositionengine/impl/planner/LayerState.h>
#include <renderengine/RenderEngine.h>

@@ -92,8 +94,8 @@ public:
    }
    void incrementAge() { ++mAge; }

    // Renders the cached set with the supplied output dataspace.
    void render(renderengine::RenderEngine&, ui::Dataspace outputDataspace);
    // Renders the cached set with the supplied output composition state.
    void render(renderengine::RenderEngine& re, const OutputCompositionState& outputState);

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

@@ -133,6 +135,7 @@ private:
    Texture mTexture;
    sp<Fence> mDrawFence;
    ui::Dataspace mOutputDataspace;
    ui::Transform::RotationFlags mOrientation = ui::Transform::ROT_0;

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

    // Renders the newest cached sets with the supplied output dataspace
    void renderCachedSets(renderengine::RenderEngine&, ui::Dataspace outputDataspace);
    // Renders the newest cached sets with the supplied output composition state
    void renderCachedSets(renderengine::RenderEngine& re,
                          const OutputCompositionState& outputState);

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

+2 −1
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ public:
            compositionengine::Output::OutputLayersEnumerator<compositionengine::Output>&& layers);

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

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

+1 −1
Original line number Diff line number Diff line
@@ -1252,7 +1252,7 @@ void Output::postFramebuffer() {

void Output::renderCachedSets() {
    if (mPlanner) {
        mPlanner->renderCachedSets(getCompositionEngine().getRenderEngine(), getState().dataspace);
        mPlanner->renderCachedSets(getCompositionEngine().getRenderEngine(), getState());
    }
}

+1 −0
Original line number Diff line number Diff line
@@ -354,6 +354,7 @@ void OutputLayer::writeOutputDependentGeometryStateToHWC(

    Rect displayFrame = outputDependentState.displayFrame;
    FloatRect sourceCrop = outputDependentState.sourceCrop;

    if (outputDependentState.overrideInfo.buffer != nullptr) { // adyabr
        displayFrame = outputDependentState.overrideInfo.displayFrame;
        sourceCrop = displayFrame.toFloatRect();
Loading