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

Commit dde87c4a authored by Peiyong Lin's avatar Peiyong Lin Committed by Android (Google) Code Review
Browse files

Merge "[SurfaceFlinger] Remove unused functions." into qt-dev

parents 2ea045dd 222859a6
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -33,12 +33,6 @@ struct LayerCompositionState {

    LayerFECompositionState frontEnd;

    /*
     * RE state
     */

    renderengine::Mesh reMesh{renderengine::Mesh::TRIANGLE_FAN, 4, 2, 2};

    // Debugging
    void dump(std::string& result) const;
};
+0 −19
Original line number Diff line number Diff line
@@ -386,13 +386,6 @@ void Layer::setupRoundedCornersCropCoordinates(Rect win,
    win.right -= roundedCornersCrop.left;
    win.top -= roundedCornersCrop.top;
    win.bottom -= roundedCornersCrop.top;

    renderengine::Mesh::VertexArray<vec2> cropCoords(
            getCompositionLayer()->editState().reMesh.getCropCoordArray<vec2>());
    cropCoords[0] = vec2(win.left, win.top);
    cropCoords[1] = vec2(win.left, win.top + win.getHeight());
    cropCoords[2] = vec2(win.right, win.top + win.getHeight());
    cropCoords[3] = vec2(win.right, win.top);
}

void Layer::latchGeometry(compositionengine::LayerFECompositionState& compositionState) const {
@@ -544,18 +537,6 @@ bool Layer::prepareClientLayer(const RenderArea& /*renderArea*/, const Region& /
    return true;
}

void Layer::clearWithOpenGL(const RenderArea& renderArea, float red, float green, float blue,
                            float alpha) const {
    auto& engine(mFlinger->getRenderEngine());
    computeGeometry(renderArea, getCompositionLayer()->editState().reMesh, false);
    engine.setupFillWithColor(red, green, blue, alpha);
    engine.drawMesh(getCompositionLayer()->getState().reMesh);
}

void Layer::clearWithOpenGL(const RenderArea& renderArea) const {
    clearWithOpenGL(renderArea, 0, 0, 0, 0);
}

void Layer::setCompositionType(const sp<const DisplayDevice>& display,
                               Hwc2::IComposerClient::Composition type) {
    const auto outputLayer = findOutputLayerForDisplay(display);
+0 −8
Original line number Diff line number Diff line
@@ -603,9 +603,6 @@ public:
    bool hasHwcLayer(const sp<const DisplayDevice>& displayDevice);
    HWC2::Layer* getHwcLayer(const sp<const DisplayDevice>& displayDevice);

    // -----------------------------------------------------------------------
    void clearWithOpenGL(const RenderArea& renderArea) const;

    inline const State& getDrawingState() const { return mDrawingState; }
    inline const State& getCurrentState() const { return mCurrentState; }
    inline State& getCurrentState() { return mCurrentState; }
@@ -729,12 +726,7 @@ protected:
     * crop coordinates, transforming them into layer space.
     */
    void setupRoundedCornersCropCoordinates(Rect win, const FloatRect& roundedCornersCrop) const;

    // drawing
    void clearWithOpenGL(const RenderArea& renderArea, float r, float g, float b,
                         float alpha) const;
    void setParent(const sp<Layer>& layer);

    LayerVector makeTraversalList(LayerVector::StateSet stateSet, bool* outSkipRelativeZUsers);
    void addZOrderRelative(const wp<Layer>& relative);
    void removeZOrderRelative(const wp<Layer>& relative);