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

Commit ad4c67af authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Remove legacy layer traversal for FrameStats logging

Also remove some dead code related to dump.

Flag: EXEMPT bugfix
Bug: 330785038
Test: presubmit
Change-Id: I15af2888c88efa988e8a655bf27aa2363f5a9573
parent 0e011d07
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -5708,7 +5708,7 @@ void SurfaceFlinger::logFrameStats(TimePoint now) {
    sTimestamp = now;

    SFTRACE_CALL();
    mDrawingState.traverse([&](Layer* layer) { layer->logFrameStats(); });
    traverseLegacyLayers([&](Layer* layer) { layer->logFrameStats(); });
}

void SurfaceFlinger::appendSfConfigString(std::string& result) const {
@@ -6011,20 +6011,6 @@ perfetto::protos::LayersProto SurfaceFlinger::dumpProtoFromMainThread(uint32_t t
            .get();
}

void SurfaceFlinger::dumpOffscreenLayers(std::string& result) {
    auto future = mScheduler->schedule([this] {
        std::string result;
        for (Layer* offscreenLayer : mOffscreenLayers) {
            offscreenLayer->traverse(LayerVector::StateSet::Drawing,
                                     [&](Layer* layer) { layer->dumpOffscreenDebugInfo(result); });
        }
        return result;
    });

    result.append("Offscreen Layers:\n");
    result.append(future.get());
}

void SurfaceFlinger::dumpHwcLayersMinidump(std::string& result) const {
    for (const auto& [token, display] : mDisplays) {
        const auto displayId = HalDisplayId::tryCast(display->getId());
+0 −1
Original line number Diff line number Diff line
@@ -1147,7 +1147,6 @@ private:
    void dumpHwc(std::string& result) const;
    perfetto::protos::LayersProto dumpProtoFromMainThread(
            uint32_t traceFlags = LayerTracing::TRACE_ALL) EXCLUDES(mStateLock);
    void dumpOffscreenLayers(std::string& result) EXCLUDES(mStateLock);
    void dumpPlannerInfo(const DumpArgs& args, std::string& result) const REQUIRES(mStateLock);

    status_t doDump(int fd, const DumpArgs& args, bool asProto);