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

Commit 8c425717 authored by Huihong Luo's avatar Huihong Luo Committed by Automerger Merge Worker
Browse files

Merge "Put debug/log code under verbose flag" into sc-dev am: 57aa9a97

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14849422

Change-Id: If0f2f380aa3a4dee0352ec801203b6155d76cbf1
parents 4c1e7957 57aa9a97
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -231,6 +231,7 @@ bool Flattener::mergeWithCachedSets(const std::vector<const LayerState*>& layers
        return false;
    }

    // the compiler should strip out the following no-op loops when ALOGV is off
    ALOGV("[%s] Incoming layers:", __func__);
    for (const LayerState* layer : layers) {
        ALOGV("%s", layer->getName().c_str());
@@ -238,9 +239,12 @@ bool Flattener::mergeWithCachedSets(const std::vector<const LayerState*>& layers

    ALOGV("[%s] Current layers:", __func__);
    for (const CachedSet& layer : mLayers) {
        const auto dumper = [&] {
            std::string dump;
            layer.dump(dump);
        ALOGV("%s", dump.c_str());
            return dump;
        };
        ALOGV("%s", dumper().c_str());
    }

    auto currentLayerIter = mLayers.begin();
@@ -473,9 +477,14 @@ void Flattener::buildCachedSets(time_point now) {

    ++mCachedSetCreationCount;
    mCachedSetCreationCost += mNewCachedSet->getCreationCost();

    // note the compiler should strip the follow no-op statements when ALOGV is off
    const auto dumper = [&] {
        std::string setDump;
        mNewCachedSet->dump(setDump);
    ALOGV("[%s] Added new cached set:\n%s", __func__, setDump.c_str());
        return setDump;
    };
    ALOGV("[%s] Added new cached set:\n%s", __func__, dumper().c_str());
}

} // namespace android::compositionengine::impl::planner