BufferQueue: Add NATIVE_WINDOW_BUFFER_AGE query

Adds a NATIVE_WINDOW_BUFFER_AGE query, which returns the age of the
contents of the most recently dequeued buffer as the number of frames
that have elapsed since it was last queued.

Change-Id: Ib6fd62945cb62d1e60133a65beee510363218a23
(cherry picked from commit 49f810c72df8d1d64128e376757079825c8decd4)
diff --git a/include/gui/BufferQueueCore.h b/include/gui/BufferQueueCore.h
index 9a43516..e3624b7 100644
--- a/include/gui/BufferQueueCore.h
+++ b/include/gui/BufferQueueCore.h
@@ -270,6 +270,10 @@
     // mAllowAllocation determines whether dequeueBuffer is allowed to allocate
     // new buffers
     bool mAllowAllocation;
+
+    // mBufferAge tracks the age of the contents of the most recently dequeued
+    // buffer as the number of frames that have elapsed since it was last queued
+    uint64_t mBufferAge;
 }; // class BufferQueueCore
 
 } // namespace android