SF: Add tests for hole punch
Bug: 186144794
Test: This
Update "peekThroughLayer"'s type to be compositionengine::OutputLayer
(the abstract base class, rather than the implementation) so that a
mock::OutputLayer pointer registers as equal to itself. Likewise, use
the same type when storing a pointer to it in
Output::writeCompositionState. Finally, use the base type as the return
value from CachedSet::getHolePunchLayer. This has the effect of updating
calls in Flattener that look like
auto* peekThroughLayer = cachedSet->getHolePunchLayer();
to use the base class type, too. It also matches other methods, like
LayerState::getOutputLayer.
Change-Id: I53fc851eca876d44ba7cb9347f1c62d659c38932
diff --git a/services/surfaceflinger/CompositionEngine/src/Output.cpp b/services/surfaceflinger/CompositionEngine/src/Output.cpp
index c809e1a..297e687 100644
--- a/services/surfaceflinger/CompositionEngine/src/Output.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Output.cpp
@@ -707,7 +707,7 @@
editState().earliestPresentTime = refreshArgs.earliestPresentTime;
- OutputLayer* peekThroughLayer = nullptr;
+ compositionengine::OutputLayer* peekThroughLayer = nullptr;
sp<GraphicBuffer> previousOverride = nullptr;
bool includeGeometry = refreshArgs.updatingGeometryThisFrame;
uint32_t z = 0;