Update producer's cache of frame events in de/queue

* Cache is only updated during queue and dequeue if
    the getFrameTimestamps is enabled.
* The consumer avoids sending a copy of the acquire
    fence back to the producer since the producer
    already has a copy.

Test: adb shell /data/nativetest/libgui_test/libgui_test
--gtest_filter=*GetFrameTimestamps*

Change-Id: I6a8b965ae79441a40893b5df937f9ed004fe7359
diff --git a/include/gui/FrameTimestamps.h b/include/gui/FrameTimestamps.h
index 5076597..0e95ec3 100644
--- a/include/gui/FrameTimestamps.h
+++ b/include/gui/FrameTimestamps.h
@@ -226,7 +226,6 @@
     nsecs_t mFirstRefreshStartTime{0};
     nsecs_t mLastRefreshStartTime{0};
 
-    sp<Fence> mAcquireFence{Fence::NO_FENCE};
     sp<Fence> mGpuCompositionDoneFence{Fence::NO_FENCE};
     sp<Fence> mDisplayPresentFence{Fence::NO_FENCE};
     sp<Fence> mDisplayRetireFence{Fence::NO_FENCE};
@@ -234,13 +233,12 @@
 
     // This is a static method with an auto return value so we can call
     // it without needing const and non-const versions.
-    template <typename ThisType>
-    static inline auto allFences(ThisType fed) ->
-            std::array<decltype(&fed->mAcquireFence), 5> {
+    template <typename ThisT>
+    static inline auto allFences(ThisT fed) ->
+            std::array<decltype(&fed->mReleaseFence), 4> {
         return {{
-            &fed->mAcquireFence, &fed->mGpuCompositionDoneFence,
-            &fed->mDisplayPresentFence, &fed->mDisplayRetireFence,
-            &fed->mReleaseFence
+            &fed->mGpuCompositionDoneFence, &fed->mDisplayPresentFence,
+            &fed->mDisplayRetireFence, &fed->mReleaseFence
         }};
     }
 };