[sf-newfe] Update layer history for invisible layers
Fixes a bug with new frontend where we were only updating
layer history for layers that has something to draw.
Cl also adds integration tests to validate frontend to
layerhistory path.
Test: LayerHistoryIntegrationTest
Fixes: 300701739
Change-Id: I223b4817bdf9909e3890de0b5051bc0ff345f829
diff --git a/services/surfaceflinger/Scheduler/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp
index 76f1af9..daf9898 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.cpp
+++ b/services/surfaceflinger/Scheduler/Scheduler.cpp
@@ -625,9 +625,9 @@
}
void Scheduler::recordLayerHistory(int32_t id, const LayerProps& layerProps, nsecs_t presentTime,
- LayerHistory::LayerUpdateType updateType) {
+ nsecs_t now, LayerHistory::LayerUpdateType updateType) {
if (pacesetterSelectorPtr()->canSwitch()) {
- mLayerHistory.record(id, layerProps, presentTime, systemTime(), updateType);
+ mLayerHistory.record(id, layerProps, presentTime, now, updateType);
}
}