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

Commit 10839214 authored by Ady Abraham's avatar Ady Abraham Committed by Android (Google) Code Review
Browse files

Merge "SF: add vsyncId to SurfaceFlinger::composite trace" into tm-dev

parents ce802713 302ebed5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ void MessageQueue::Handler::handleMessage(const Message&) {
        return;
    }

    compositor.composite(frameTime);
    compositor.composite(frameTime, mVsyncId);
    compositor.sample();
}

+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ namespace android {

struct ICompositor {
    virtual bool commit(nsecs_t frameTime, int64_t vsyncId, nsecs_t expectedVsyncTime) = 0;
    virtual void composite(nsecs_t frameTime) = 0;
    virtual void composite(nsecs_t frameTime, int64_t vsyncId) = 0;
    virtual void sample() = 0;

protected:
+2 −2
Original line number Diff line number Diff line
@@ -2199,8 +2199,8 @@ bool SurfaceFlinger::commit(nsecs_t frameTime, int64_t vsyncId, nsecs_t expected
    return mustComposite && CC_LIKELY(mBootStage != BootStage::BOOTLOADER);
}

void SurfaceFlinger::composite(nsecs_t frameTime) {
    ATRACE_CALL();
void SurfaceFlinger::composite(nsecs_t frameTime, int64_t vsyncId) {
    ATRACE_FORMAT("%s %" PRId64, __func__, vsyncId);
    MainThreadScopedGuard mainThreadGuard(SF_MAIN_THREAD);
    if (mPowerHintSessionData.sessionEnabled) {
        mPowerHintSessionData.compositeStart = systemTime();
+1 −1
Original line number Diff line number Diff line
@@ -671,7 +671,7 @@ private:

    // Composites a frame for each display. CompositionEngine performs GPU and/or HAL composition
    // via RenderEngine and the Composer HAL, respectively.
    void composite(nsecs_t frameTime) override;
    void composite(nsecs_t frameTime, int64_t vsyncId) override;

    // Samples the composited frame via RegionSamplingThread.
    void sample() override;
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ public:
private:
    // ICompositor overrides:
    bool commit(nsecs_t, int64_t, nsecs_t) override { return false; }
    void composite(nsecs_t) override {}
    void composite(nsecs_t, int64_t) override {}
    void sample() override {}
};
}; // namespace scheduler
Loading