SF: Layer children should call parents' onFirstRef
Classes which inherit indirectly from Layer and which override
onFirstRef need to also call their parents' onFirstRef to ensure that
Layer is initialized correctly.
Bug: 111854867
Test: atest UiAutomationTest#testWindowContentFrameStats
Change-Id: I5ceb531a5d59587ab489342d0b19a42c1a286402
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index 2e411f1..44fa760 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -537,6 +537,8 @@
}
void BufferStateLayer::onFirstRef() {
+ BufferLayer::onFirstRef();
+
if (const auto display = mFlinger->getDefaultDisplayDevice()) {
updateTransformHint(display);
}