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/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index b5fe266..fa2f59a 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -159,7 +159,7 @@
     }
 
     virtual status_t getSupportedFrameTimestamps(
-            std::vector<SupportableFrameTimestamps>* outSupported) const {
+            std::vector<FrameEvent>* outSupported) const {
         if (!outSupported) {
             return UNEXPECTED_NULL;
         }
@@ -197,7 +197,7 @@
 
         outSupported->reserve(supported.size());
         for (int32_t s : supported) {
-            outSupported->push_back(static_cast<SupportableFrameTimestamps>(s));
+            outSupported->push_back(static_cast<FrameEvent>(s));
         }
         return NO_ERROR;
     }
@@ -566,7 +566,7 @@
         }
         case GET_SUPPORTED_FRAME_TIMESTAMPS: {
             CHECK_INTERFACE(ISurfaceComposer, data, reply);
-            std::vector<SupportableFrameTimestamps> supportedTimestamps;
+            std::vector<FrameEvent> supportedTimestamps;
             status_t result = getSupportedFrameTimestamps(&supportedTimestamps);
             status_t err = reply->writeInt32(result);
             if (err != NO_ERROR) {
@@ -578,7 +578,7 @@
 
             std::vector<int32_t> supported;
             supported.reserve(supportedTimestamps.size());
-            for (SupportableFrameTimestamps s : supportedTimestamps) {
+            for (FrameEvent s : supportedTimestamps) {
                 supported.push_back(static_cast<int32_t>(s));
             }
             return reply->writeInt32Vector(supported);