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

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

Merge "CE: Remove page flip count"

parents 3020c9e6 87157a70
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -91,16 +91,9 @@ public:
    // Called after the HWC calls are made to present the display
    virtual void onPresentDisplayCompleted() = 0;

    // Called after the surface has been rendering to signal the surface should
    // be made ready for displaying
    virtual void flip() = 0;

    // Debugging - Dumps the state of the RenderSurface to a string
    virtual void dump(std::string& result) const = 0;

    // Debugging - gets the page flip count for the RenderSurface
    virtual std::uint32_t getPageFlipCount() const = 0;

    // Returns true if the render surface supports client composition prediction.
    virtual bool supportsCompositionStrategyPrediction() const = 0;
};
+0 −4
Original line number Diff line number Diff line
@@ -62,15 +62,12 @@ public:
            base::unique_fd* bufferFence) override;
    void queueBuffer(base::unique_fd readyFence) override;
    void onPresentDisplayCompleted() override;
    void flip() override;
    bool supportsCompositionStrategyPrediction() const override;

    // Debugging
    void dump(std::string& result) const override;
    std::uint32_t getPageFlipCount() const override;

    // Testing
    void setPageFlipCountForTest(std::uint32_t);
    void setSizeForTest(const ui::Size&);
    std::shared_ptr<renderengine::ExternalTexture>& mutableTextureForTest();
    base::unique_fd& mutableBufferReadyForTest();
@@ -89,7 +86,6 @@ private:
    ui::Size mSize;
    const size_t mMaxTextureCacheSize;
    bool mProtected{false};
    std::uint32_t mPageFlipCount{0};
};

std::unique_ptr<compositionengine::RenderSurface> createRenderSurface(
+0 −2
Original line number Diff line number Diff line
@@ -42,9 +42,7 @@ public:
    MOCK_METHOD1(dequeueBuffer, std::shared_ptr<renderengine::ExternalTexture>(base::unique_fd*));
    MOCK_METHOD1(queueBuffer, void(base::unique_fd));
    MOCK_METHOD0(onPresentDisplayCompleted, void());
    MOCK_METHOD0(flip, void());
    MOCK_CONST_METHOD1(dump, void(std::string& result));
    MOCK_CONST_METHOD0(getPageFlipCount, std::uint32_t());
    MOCK_CONST_METHOD0(supportsCompositionStrategyPrediction, bool());
};

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

    auto& outputState = editState();
    outputState.dirtyRegion.clear();
    mRenderSurface->flip();

    auto frame = presentAndGetFrameFences();

+0 −13
Original line number Diff line number Diff line
@@ -251,10 +251,6 @@ void RenderSurface::onPresentDisplayCompleted() {
    mDisplaySurface->onFrameCommitted();
}

void RenderSurface::flip() {
    mPageFlipCount++;
}

void RenderSurface::dump(std::string& out) const {
    using android::base::StringAppendF;

@@ -265,7 +261,6 @@ void RenderSurface::dump(std::string& out) const {
    dumpVal(out, "size", mSize);
    StringAppendF(&out, "ANativeWindow=%p (format %d) ", mNativeWindow.get(),
                  ANativeWindow_getFormat(mNativeWindow.get()));
    dumpVal(out, "flips", mPageFlipCount);
    out.append("\n");

    String8 surfaceDump;
@@ -273,14 +268,6 @@ void RenderSurface::dump(std::string& out) const {
    out.append(surfaceDump);
}

std::uint32_t RenderSurface::getPageFlipCount() const {
    return mPageFlipCount;
}

void RenderSurface::setPageFlipCountForTest(std::uint32_t count) {
    mPageFlipCount = count;
}

void RenderSurface::setSizeForTest(const ui::Size& size) {
    mSize = size;
}
Loading