Moved info about activeBuffer into bufferInfo (2/2)

This is in preparation for layer mirroring since mirrored buffer layers
should just copy the bufferInfo instead of the entire BufferQueue or
parts of BufferState

Test: go/wm-smoke
Change-Id: I48c34141151370d9905c312239883f8374b884b9
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index ea5b844..d6cc27a 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -382,7 +382,7 @@
     // creates its tracks by buffer id and has no way of associating a buffer back to the process
     // that created it, the current implementation is only sufficient for cases where a buffer is
     // only used within a single layer.
-    uint64_t getCurrentBufferId() const { return mActiveBuffer ? mActiveBuffer->getId() : 0; }
+    uint64_t getCurrentBufferId() const { return getBuffer() ? getBuffer()->getId() : 0; }
 
     // -----------------------------------------------------------------------
     // Virtuals
@@ -594,6 +594,8 @@
      */
     virtual uint32_t getBufferTransform() const { return 0; }
 
+    virtual sp<GraphicBuffer> getBuffer() const { return nullptr; }
+
     /*
      * Returns if a frame is ready
      */
@@ -844,9 +846,6 @@
 
     // main thread
     sp<NativeHandle> mSidebandStream;
-    // Active buffer fields
-    sp<GraphicBuffer> mActiveBuffer;
-    sp<Fence> mActiveBufferFence;
     // False if the buffer and its contents have been previously used for GPU
     // composition, true otherwise.
     bool mIsActiveBufferUpdatedForGpu = true;