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

Commit 4b238a40 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SF: cleanup flags" into main

parents 5de5ee64 0542bbfe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ bool DisplayEventDispatcher::processPendingEvents(nsecs_t* outTimestamp,
                    *outVsyncEventData = ev.vsync.vsyncData;

                    // Trace the RenderRate for this app
                    if (ATRACE_ENABLED() && flags::trace_frame_rate_override()) {
                    if (ATRACE_ENABLED()) {
                        const auto frameInterval = ev.vsync.vsyncData.frameInterval;
                        int fps = frameInterval > 0 ? 1e9f / frameInterval : 0;
                        ATRACE_INT("RenderRate", fps);
+0 −11
Original line number Diff line number Diff line
@@ -48,17 +48,6 @@ flag {
  is_fixed_read_only: true
} # bq_extendedallocate

flag {
  name: "trace_frame_rate_override"
  namespace: "core_graphics"
  description: "Trace FrameRateOverride fps"
  bug: "347314033"
  is_fixed_read_only: true
  metadata {
    purpose: PURPOSE_BUGFIX
  }
} # trace_frame_rate_override

flag {
  name: "wb_consumer_base_owns_bq"
  namespace: "core_graphics"
+1 −3
Original line number Diff line number Diff line
@@ -916,9 +916,7 @@ FrameTimeline::FrameTimeline(std::shared_ptr<TimeStats> timeStats, pid_t surface
                             JankClassificationThresholds thresholds, bool useBootTimeClock,
                             bool filterFramesBeforeTraceStarts)
      : mUseBootTimeClock(useBootTimeClock),
        mFilterFramesBeforeTraceStarts(
                FlagManager::getInstance().filter_frames_before_trace_starts() &&
                filterFramesBeforeTraceStarts),
        mFilterFramesBeforeTraceStarts(filterFramesBeforeTraceStarts),
        mMaxDisplayFrames(kDefaultMaxDisplayFrames),
        mTimeStats(std::move(timeStats)),
        mSurfaceFlingerPid(surfaceFlingerPid),
+1 −1
Original line number Diff line number Diff line
@@ -1089,7 +1089,7 @@ auto RefreshRateSelector::getFrameRateOverrides(const std::vector<LayerRequireme
        ALOGV("%s: overriding to %s for uid=%d", __func__, to_string(overrideFps).c_str(), uid);
        SFTRACE_FORMAT_INSTANT("%s: overriding to %s for uid=%d", __func__,
                               to_string(overrideFps).c_str(), uid);
        if (SFTRACE_ENABLED() && FlagManager::getInstance().trace_frame_rate_override()) {
        if (SFTRACE_ENABLED()) {
            std::stringstream ss;
            ss << "FrameRateOverride " << uid;
            SFTRACE_INT(ss.str().c_str(), overrideFps.getIntValue());
+11 −27
Original line number Diff line number Diff line
@@ -38,12 +38,6 @@ using base::StringAppendF;

namespace {

ScheduleResult getExpectedCallbackTime(nsecs_t nextVsyncTime,
                                       const VSyncDispatch::ScheduleTiming& timing) {
    return {TimePoint::fromNs(nextVsyncTime - timing.readyDuration - timing.workDuration),
            TimePoint::fromNs(nextVsyncTime)};
}

void traceEntry(const VSyncDispatchTimerQueueEntry& entry, nsecs_t now) {
    if (!SFTRACE_ENABLED() || !entry.wakeupTime().has_value() || !entry.targetVsync().has_value()) {
        return;
@@ -113,20 +107,12 @@ ScheduleResult VSyncDispatchTimerQueueEntry::schedule(VSyncDispatch::ScheduleTim
            mArmedInfo && ((nextWakeupTime > (mArmedInfo->mActualWakeupTime + mMinVsyncDistance)));
    SFTRACE_FORMAT_INSTANT("%s: wouldSkipAVsyncTarget=%d wouldSkipAWakeup=%d", mName.c_str(),
                           wouldSkipAVsyncTarget, wouldSkipAWakeup);
    if (FlagManager::getInstance().dont_skip_on_early_ro()) {
    if (wouldSkipAVsyncTarget || wouldSkipAWakeup) {
        nextVsyncTime = mArmedInfo->mActualVsyncTime;
    } else {
        nextVsyncTime = adjustVsyncIfNeeded(tracker, nextVsyncTime);
    }
    nextWakeupTime = std::max(now, nextVsyncTime - timing.workDuration - timing.readyDuration);
    } else {
        if (wouldSkipAVsyncTarget && wouldSkipAWakeup) {
            return getExpectedCallbackTime(nextVsyncTime, timing);
        }
        nextVsyncTime = adjustVsyncIfNeeded(tracker, nextVsyncTime);
        nextWakeupTime = nextVsyncTime - timing.workDuration - timing.readyDuration;
    }

    auto const nextReadyTime = nextVsyncTime - timing.readyDuration;
    mScheduleTiming = timing;
@@ -184,7 +170,6 @@ auto VSyncDispatchTimerQueueEntry::getArmedInfo(VSyncTracker& tracker, nsecs_t n
    const auto nextReadyTime = nextVsyncTime - timing.readyDuration;
    const auto nextWakeupTime = nextReadyTime - timing.workDuration;

    if (FlagManager::getInstance().dont_skip_on_early_ro()) {
    bool const wouldSkipAVsyncTarget =
            armedInfo && (nextVsyncTime > (armedInfo->mActualVsyncTime + mMinVsyncDistance));
    bool const wouldSkipAWakeup =
@@ -194,7 +179,6 @@ auto VSyncDispatchTimerQueueEntry::getArmedInfo(VSyncTracker& tracker, nsecs_t n
    if (wouldSkipAVsyncTarget || wouldSkipAWakeup) {
        return *armedInfo;
    }
    }

    return ArmingInfo{nextWakeupTime, nextVsyncTime, nextReadyTime};
}
Loading