surfaceflinger: move SurfaceFlingerConsumer::mLayer

Move mLayer and related methods to the base class,
BufferLayerConsumer.

Test: boots
Change-Id: I835ec0990b5bbdbd2b61444b6fbad700e0cb8c14
diff --git a/services/surfaceflinger/BufferLayerConsumer.h b/services/surfaceflinger/BufferLayerConsumer.h
index 8382b46..f8da6bf 100644
--- a/services/surfaceflinger/BufferLayerConsumer.h
+++ b/services/surfaceflinger/BufferLayerConsumer.h
@@ -33,6 +33,7 @@
 namespace android {
 // ----------------------------------------------------------------------------
 
+class Layer;
 class String8;
 
 /*
@@ -58,7 +59,7 @@
     // BufferLayerConsumer constructs a new BufferLayerConsumer object.
     // The tex parameter indicates the name of the OpenGL ES
     // texture to which images are to be streamed.
-    BufferLayerConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex);
+    BufferLayerConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, Layer* layer);
 
     // updateTexImage acquires the most recently queued buffer, and sets the
     // image contents of the target texture to it.
@@ -254,6 +255,11 @@
     // This method must be called with mMutex locked.
     virtual void freeBufferLocked(int slotIndex);
 
+    // IConsumerListener interface
+    void onDisconnect() override;
+    void addAndGetFrameTimestamps(const NewFrameEventsEntry* newTimestamps,
+                                  FrameEventHistoryDelta* outDelta) override;
+
     // computeCurrentTransformMatrixLocked computes the transform matrix for the
     // current texture.  It uses mCurrentTransform and the current GraphicBuffer
     // to compute this matrix and stores it in mCurrentTransformMatrix.
@@ -332,6 +338,9 @@
     // be bound when updateTexImage is called. It is set at construction time.
     const uint32_t mTexName;
 
+    // The layer for this BufferLayerConsumer
+    const wp<Layer> mLayer;
+
     // EGLSlot contains the information and object references that
     // BufferLayerConsumer maintains about a BufferQueue buffer slot.
     struct EglSlot {