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

Commit 05e07c83 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9580861 from 1bd7165a to udc-release

Change-Id: I28518df48be338917a15e2ebdd2e763d476ab982
parents f108eaec 1bd7165a
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -164,17 +164,7 @@ void TouchState::cancelPointersForNonPilferingWindows() {
    std::for_each(windows.begin(), windows.end(), [&allPilferedPointerIds](TouchedWindow& w) {
        std::bitset<MAX_POINTER_ID + 1> pilferedByOtherWindows =
                w.pilferedPointerIds ^ allPilferedPointerIds;
        // TODO(b/211379801) : convert pointerIds to use std::bitset, which would allow us to
        // replace the loop below with a bitwise operation. Currently, the XOR operation above is
        // redundant, but is done to make the code more explicit / easier to convert later.
        for (std::size_t i = 0; i < pilferedByOtherWindows.size(); i++) {
            if (pilferedByOtherWindows.test(i) && !w.pilferedPointerIds.test(i)) {
                // Pointer is pilfered by other windows, but not by this one! Remove it from here.
                // We could call 'removeTouchedPointerFromWindow' here, but it's faster to directly
                // manipulate it.
                w.pointerIds.reset(i);
            }
        }
        w.pointerIds &= ~pilferedByOtherWindows;
    });
    std::erase_if(windows, [](const TouchedWindow& w) { return w.pointerIds.none(); });
}
+3 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <android-base/thread_annotations.h>
#include <android/native_window.h>
#include <binder/IBinder.h>
#include <ftl/concat.h>
#include <gui/LayerState.h>
#include <math/mat4.h>
#include <renderengine/RenderEngine.h>
@@ -300,8 +301,8 @@ private:

    mutable std::mutex mActiveModeLock;
    ActiveModeInfo mDesiredActiveMode GUARDED_BY(mActiveModeLock);
    TracedOrdinal<bool> mDesiredActiveModeChanged
            GUARDED_BY(mActiveModeLock) = {"DesiredActiveModeChanged", false};
    TracedOrdinal<bool> mDesiredActiveModeChanged GUARDED_BY(mActiveModeLock) =
            {ftl::Concat("DesiredActiveModeChanged-", getId().value).c_str(), false};
    ActiveModeInfo mUpcomingActiveMode GUARDED_BY(kMainThreadContext);
};

+0 −1
Original line number Diff line number Diff line
@@ -238,7 +238,6 @@ struct RefreshRateSelector::RefreshRateScoreComparator {
        std::string name = to_string(frameRateMode);

        ALOGV("%s sorting scores %.2f", name.c_str(), overallScore);
        ATRACE_INT(name.c_str(), static_cast<int>(std::round(overallScore * 100)));

        if (!ScoredFrameRate::scoresEqual(overallScore, rhs.overallScore)) {
            return overallScore > rhs.overallScore;
+0 −3
Original line number Diff line number Diff line
@@ -272,7 +272,6 @@ void Scheduler::onScreenAcquired(ConnectionHandle handle) {
        thread = mConnections[handle].thread.get();
    }
    thread->onScreenAcquired();
    mScreenAcquired = true;
}

void Scheduler::onScreenReleased(ConnectionHandle handle) {
@@ -283,7 +282,6 @@ void Scheduler::onScreenReleased(ConnectionHandle handle) {
        thread = mConnections[handle].thread.get();
    }
    thread->onScreenReleased();
    mScreenAcquired = false;
}

void Scheduler::onFrameRateOverridesChanged(ConnectionHandle handle, PhysicalDisplayId displayId) {
@@ -642,7 +640,6 @@ void Scheduler::dump(utils::Dumper& dumper) const {
        utils::Dumper::Section section(dumper, "Hardware VSYNC"sv);

        std::lock_guard lock(mHWVsyncLock);
        dumper.dump("screenAcquired"sv, mScreenAcquired.load());
        dumper.dump("hwVsyncAvailable"sv, mHWVsyncAvailable);
        dumper.dump("hwVsyncEnabled"sv, mPrimaryHWVsyncEnabled);
    }
+0 −3
Original line number Diff line number Diff line
@@ -439,9 +439,6 @@ private:
    static constexpr std::chrono::nanoseconds MAX_VSYNC_APPLIED_TIME = 200ms;

    FrameRateOverrideMappings mFrameRateOverrideMappings;

    // Keeps track of whether the screen is acquired for debug
    std::atomic<bool> mScreenAcquired = false;
};

} // namespace scheduler