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

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

Merge "Remove buffer occupancy stats"

parents 8373483b 1dc4bfa7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -346,13 +346,13 @@ TimeStats::SetFrameRateVote frameRateToSetFrameRateVotePayload(Layer::FrameRate
}
} // namespace

bool BufferLayer::onPostComposition(const DisplayDevice* display,
void BufferLayer::onPostComposition(const DisplayDevice* display,
                                    const std::shared_ptr<FenceTime>& glDoneFence,
                                    const std::shared_ptr<FenceTime>& presentFence,
                                    const CompositorTiming& compositorTiming) {
    // mFrameLatencyNeeded is true when a new frame was latched for the
    // composition.
    if (!mBufferInfo.mFrameLatencyNeeded) return false;
    if (!mBufferInfo.mFrameLatencyNeeded) return;

    // Update mFrameEventHistory.
    {
@@ -426,7 +426,6 @@ bool BufferLayer::onPostComposition(const DisplayDevice* display,

    mFrameTracker.advanceFrame();
    mBufferInfo.mFrameLatencyNeeded = false;
    return true;
}

void BufferLayer::gatherBufferInfo() {
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ public:

    bool isHdrY410() const override;

    bool onPostComposition(const DisplayDevice*, const std::shared_ptr<FenceTime>& glDoneFence,
    void onPostComposition(const DisplayDevice*, const std::shared_ptr<FenceTime>& glDoneFence,
                           const std::shared_ptr<FenceTime>& presentFence,
                           const CompositorTiming&) override;

+0 −10
Original line number Diff line number Diff line
@@ -65,16 +65,6 @@ void BufferQueueLayer::setTransformHint(ui::Transform::RotationFlags displayTran
    mConsumer->setTransformHint(mTransformHint);
}

std::vector<OccupancyTracker::Segment> BufferQueueLayer::getOccupancyHistory(bool forceFlush) {
    std::vector<OccupancyTracker::Segment> history;
    status_t result = mConsumer->getOccupancyHistory(forceFlush, &history);
    if (result != NO_ERROR) {
        ALOGW("[%s] Failed to obtain occupancy history (%d)", getDebugName(), result);
        return {};
    }
    return history;
}

void BufferQueueLayer::releasePendingBuffer(nsecs_t dequeueReadyTime) {
    if (!mConsumer->releasePendingBuffer()) {
        return;
+0 −2
Original line number Diff line number Diff line
@@ -44,8 +44,6 @@ public:

    void onLayerDisplayed(const sp<Fence>& releaseFence) override;

    std::vector<OccupancyTracker::Segment> getOccupancyHistory(bool forceFlush) override;

    // If a buffer was replaced this frame, release the former buffer
    void releasePendingBuffer(nsecs_t dequeueReadyTime) override;

+2 −8
Original line number Diff line number Diff line
@@ -525,12 +525,10 @@ public:
     * called after composition.
     * returns true if the layer latched a new buffer this frame.
     */
    virtual bool onPostComposition(const DisplayDevice*,
    virtual void onPostComposition(const DisplayDevice*,
                                   const std::shared_ptr<FenceTime>& /*glDoneFence*/,
                                   const std::shared_ptr<FenceTime>& /*presentFence*/,
                                   const CompositorTiming&) {
        return false;
    }
                                   const CompositorTiming&) {}

    // If a buffer was replaced this frame, release the former buffer
    virtual void releasePendingBuffer(nsecs_t /*dequeueReadyTime*/) { }
@@ -591,10 +589,6 @@ public:
    }
    virtual FrameRate getFrameRateForLayerTree() const;

    virtual std::vector<OccupancyTracker::Segment> getOccupancyHistory(bool /*forceFlush*/) {
        return {};
    }

    virtual bool getTransformToDisplayInverse() const { return false; }

    // Returns how rounded corners should be drawn for this layer.
Loading