[Mirror Layers] Added functions to update mirrored layers info (2/4)

Added updateMirrorInfo and updateBufferInfoFromClone to ensure the state
and buffer of the clones are updated properly. updateMirrorInfo is
called when commitTransaction is called to update the drawing state,
children, and relatives. updateBufferInfoFromClone is called in
handlePageFlip after the real layer calls latchBuffer to ensure the
cloned layer gets the updated buffer and buffer info.

Test: No mirror request yet so everything runs normally
Bug: 131622422
Change-Id: Ic2b1f66cab98175dbdccf90f2f8310c7f19d8cff
diff --git a/services/surfaceflinger/BufferLayer.h b/services/surfaceflinger/BufferLayer.h
index b2c0618..656ba12 100644
--- a/services/surfaceflinger/BufferLayer.h
+++ b/services/surfaceflinger/BufferLayer.h
@@ -165,6 +165,8 @@
 
         sp<GraphicBuffer> mBuffer;
         int mBufferSlot{BufferQueue::INVALID_BUFFER_SLOT};
+
+        bool mFrameLatencyNeeded{false};
     };
 
     BufferInfo mBufferInfo;
@@ -195,6 +197,8 @@
 
     ui::Dataspace translateDataspace(ui::Dataspace dataspace);
     void setInitialValuesForClone(const sp<Layer>& clonedFrom);
+    void updateCloneBufferInfo() override;
+    uint64_t mPreviousFrameNumber = 0;
 
 private:
     // Returns true if this layer requires filtering