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: I5e29b6619d1a2e48277ad465a64d1f13bb92905c
Merged-In: I5ceb531a5d59587ab489342d0b19a42c1a286402
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index 12267ad..7ac1432 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -701,6 +701,8 @@
 }
 
 void BufferLayer::onFirstRef() {
+    Layer::onFirstRef();
+
     // Creates a custom BufferQueue for SurfaceFlingerConsumer to use
     sp<IGraphicBufferProducer> producer;
     sp<IGraphicBufferConsumer> consumer;