Cache frame event history producer-side.

* Producer maintains a recent history of frames.
* Producer only does a binder call if requested
    informatiVon doesn't exist in the cache.
* Consumer sends fences to the producer, which
    can be queried for timestamps without a
    binder call.

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

Change-Id: I8a64579407cc2935f5c659462cb227b07ba27e43
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 8400136..45d1477 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -567,16 +567,15 @@
 }
 
 status_t SurfaceFlinger::getSupportedFrameTimestamps(
-        std::vector<SupportableFrameTimestamps>* outSupported) const {
+        std::vector<FrameEvent>* outSupported) const {
     *outSupported = {
-        SupportableFrameTimestamps::REQUESTED_PRESENT,
-        SupportableFrameTimestamps::ACQUIRE,
-        SupportableFrameTimestamps::REFRESH_START,
-        SupportableFrameTimestamps::GL_COMPOSITION_DONE_TIME,
+        FrameEvent::REQUESTED_PRESENT,
+        FrameEvent::ACQUIRE,
+        FrameEvent::FIRST_REFRESH_START,
+        FrameEvent::GL_COMPOSITION_DONE,
         getHwComposer().retireFenceRepresentsStartOfScanout() ?
-                SupportableFrameTimestamps::DISPLAY_PRESENT_TIME :
-                SupportableFrameTimestamps::DISPLAY_RETIRE_TIME,
-        SupportableFrameTimestamps::RELEASE_TIME,
+                FrameEvent::DISPLAY_PRESENT : FrameEvent::DISPLAY_RETIRE,
+        FrameEvent::RELEASE,
     };
     return NO_ERROR;
 }