Loading services/inputflinger/dispatcher/TouchState.cpp +1 −11 Original line number Diff line number Diff line Loading @@ -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(); }); } Loading services/surfaceflinger/DisplayDevice.h +3 −2 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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); }; Loading services/surfaceflinger/Scheduler/RefreshRateSelector.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -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; Loading services/surfaceflinger/Scheduler/Scheduler.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -272,7 +272,6 @@ void Scheduler::onScreenAcquired(ConnectionHandle handle) { thread = mConnections[handle].thread.get(); } thread->onScreenAcquired(); mScreenAcquired = true; } void Scheduler::onScreenReleased(ConnectionHandle handle) { Loading @@ -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) { Loading Loading @@ -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); } Loading services/surfaceflinger/Scheduler/Scheduler.h +0 −3 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
services/inputflinger/dispatcher/TouchState.cpp +1 −11 Original line number Diff line number Diff line Loading @@ -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(); }); } Loading
services/surfaceflinger/DisplayDevice.h +3 −2 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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); }; Loading
services/surfaceflinger/Scheduler/RefreshRateSelector.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -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; Loading
services/surfaceflinger/Scheduler/Scheduler.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -272,7 +272,6 @@ void Scheduler::onScreenAcquired(ConnectionHandle handle) { thread = mConnections[handle].thread.get(); } thread->onScreenAcquired(); mScreenAcquired = true; } void Scheduler::onScreenReleased(ConnectionHandle handle) { Loading @@ -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) { Loading Loading @@ -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); } Loading
services/surfaceflinger/Scheduler/Scheduler.h +0 −3 Original line number Diff line number Diff line Loading @@ -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 Loading