Loading services/surfaceflinger/Scheduler/LayerHistory.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -173,5 +173,18 @@ void LayerHistory::removeIrrelevantLayers() { } } void LayerHistory::clearHistory() { std::lock_guard lock(mLock); auto it = mActiveLayerInfos.begin(); while (it != mActiveLayerInfos.end()) { auto id = it->first; auto layerInfo = it->second; layerInfo->clearHistory(); mInactiveLayerInfos.insert({id, layerInfo}); it = mActiveLayerInfos.erase(it); } } } // namespace scheduler } // namespace android No newline at end of file services/surfaceflinger/Scheduler/LayerHistory.h +3 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,9 @@ public: // layers. See go/content-fps-detection-in-scheduler for more information. std::pair<float, bool> getDesiredRefreshRateAndHDR(); // Clears all layer history. void clearHistory(); // Removes the handle and the object from the map. void destroyLayer(const int64_t id); Loading services/surfaceflinger/Scheduler/Scheduler.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -407,6 +407,10 @@ void Scheduler::notifyTouchEvent() { if (mSupportKernelTimer) { resetIdleTimer(); } // Touch event will boost the refresh rate to performance. // Clear Layer History to get fresh FPS detection mLayerHistory.clearHistory(); } void Scheduler::resetTimerCallback() { Loading Loading
services/surfaceflinger/Scheduler/LayerHistory.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -173,5 +173,18 @@ void LayerHistory::removeIrrelevantLayers() { } } void LayerHistory::clearHistory() { std::lock_guard lock(mLock); auto it = mActiveLayerInfos.begin(); while (it != mActiveLayerInfos.end()) { auto id = it->first; auto layerInfo = it->second; layerInfo->clearHistory(); mInactiveLayerInfos.insert({id, layerInfo}); it = mActiveLayerInfos.erase(it); } } } // namespace scheduler } // namespace android No newline at end of file
services/surfaceflinger/Scheduler/LayerHistory.h +3 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,9 @@ public: // layers. See go/content-fps-detection-in-scheduler for more information. std::pair<float, bool> getDesiredRefreshRateAndHDR(); // Clears all layer history. void clearHistory(); // Removes the handle and the object from the map. void destroyLayer(const int64_t id); Loading
services/surfaceflinger/Scheduler/Scheduler.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -407,6 +407,10 @@ void Scheduler::notifyTouchEvent() { if (mSupportKernelTimer) { resetIdleTimer(); } // Touch event will boost the refresh rate to performance. // Clear Layer History to get fresh FPS detection mLayerHistory.clearHistory(); } void Scheduler::resetTimerCallback() { Loading