[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/Layer.h b/services/surfaceflinger/Layer.h
index 78a3a7c..0b66866 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -908,10 +908,10 @@
void callReleaseBufferCallback(const sp<ITransactionCompletedListener>& listener,
const sp<GraphicBuffer>& buffer, uint64_t framenumber,
const sp<Fence>& releaseFence);
- bool setFrameRateForLayerTreeLegacy(FrameRate);
- bool setFrameRateForLayerTree(FrameRate, const scheduler::LayerProps&);
- void recordLayerHistoryBufferUpdate(const scheduler::LayerProps&);
- void recordLayerHistoryAnimationTx(const scheduler::LayerProps&);
+ bool setFrameRateForLayerTreeLegacy(FrameRate, nsecs_t now);
+ bool setFrameRateForLayerTree(FrameRate, const scheduler::LayerProps&, nsecs_t now);
+ void recordLayerHistoryBufferUpdate(const scheduler::LayerProps&, nsecs_t now);
+ void recordLayerHistoryAnimationTx(const scheduler::LayerProps&, nsecs_t now);
auto getLayerProps() const {
return scheduler::LayerProps{
.visible = isVisible(),