Change GL references to GPU for getFrameTimestamps.

Test: Rename only.

Change-Id: Idaf7ab38f78f58aa8387823f47dac084e21eb1f0
diff --git a/include/gui/FrameTimestamps.h b/include/gui/FrameTimestamps.h
index 9e1ae94..174c5ea 100644
--- a/include/gui/FrameTimestamps.h
+++ b/include/gui/FrameTimestamps.h
@@ -41,7 +41,7 @@
     ACQUIRE,
     FIRST_REFRESH_START,
     LAST_REFRESH_START,
-    GL_COMPOSITION_DONE,
+    GPU_COMPOSITION_DONE,
     DISPLAY_PRESENT,
     DISPLAY_RETIRE,
     DEQUEUE_READY,
diff --git a/libs/gui/FrameTimestamps.cpp b/libs/gui/FrameTimestamps.cpp
index 1b44e3a..f11ffdd 100644
--- a/libs/gui/FrameTimestamps.cpp
+++ b/libs/gui/FrameTimestamps.cpp
@@ -430,7 +430,7 @@
     if (!frame->addPostCompositeCalled) {
         frame->addPostCompositeCalled = true;
         frame->gpuCompositionDoneFence = gpuCompositionDone;
-        mFramesDirty[mCompositionOffset].setDirty<FrameEvent::GL_COMPOSITION_DONE>();
+        mFramesDirty[mCompositionOffset].setDirty<FrameEvent::GPU_COMPOSITION_DONE>();
         if (!frame->displayPresentFence->isValid()) {
             frame->displayPresentFence = displayPresent;
             mFramesDirty[mCompositionOffset].setDirty<FrameEvent::DISPLAY_PRESENT>();
@@ -511,7 +511,7 @@
       mFirstRefreshStartTime(frameTimestamps.firstRefreshStartTime),
       mLastRefreshStartTime(frameTimestamps.lastRefreshStartTime),
       mDequeueReadyTime(frameTimestamps.dequeueReadyTime) {
-    if (dirtyFields.isDirty<FrameEvent::GL_COMPOSITION_DONE>()) {
+    if (dirtyFields.isDirty<FrameEvent::GPU_COMPOSITION_DONE>()) {
         mGpuCompositionDoneFence =
                 frameTimestamps.gpuCompositionDoneFence->getSnapshot();
     }
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index d285ef0..45bf8c8 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -196,7 +196,7 @@
         const nsecs_t* outLatchTime,
         const nsecs_t* outFirstRefreshStartTime,
         const nsecs_t* outLastRefreshStartTime,
-        const nsecs_t* outGlCompositionDoneTime,
+        const nsecs_t* outGpuCompositionDoneTime,
         const nsecs_t* outDisplayPresentTime,
         const nsecs_t* outDisplayRetireTime,
         const nsecs_t* outDequeueReadyTime,
@@ -204,7 +204,7 @@
     bool checkForLatch = (outLatchTime != nullptr) && !e->hasLatchInfo();
     bool checkForFirstRefreshStart = (outFirstRefreshStartTime != nullptr) &&
             !e->hasFirstRefreshStartInfo();
-    bool checkForGlCompositionDone = (outGlCompositionDoneTime != nullptr) &&
+    bool checkForGpuCompositionDone = (outGpuCompositionDoneTime != nullptr) &&
             !e->hasGpuCompositionDoneInfo();
     bool checkForDisplayPresent = (outDisplayPresentTime != nullptr) &&
             !e->hasDisplayPresentInfo();
@@ -223,7 +223,7 @@
 
     // RequestedPresent and Acquire info are always available producer-side.
     return checkForLatch || checkForFirstRefreshStart ||
-            checkForLastRefreshStart || checkForGlCompositionDone ||
+            checkForLastRefreshStart || checkForGpuCompositionDone ||
             checkForDisplayPresent || checkForDisplayRetire ||
             checkForDequeueReady || checkForRelease;
 }
@@ -244,7 +244,7 @@
 status_t Surface::getFrameTimestamps(uint64_t frameNumber,
         nsecs_t* outRequestedPresentTime, nsecs_t* outAcquireTime,
         nsecs_t* outLatchTime, nsecs_t* outFirstRefreshStartTime,
-        nsecs_t* outLastRefreshStartTime, nsecs_t* outGlCompositionDoneTime,
+        nsecs_t* outLastRefreshStartTime, nsecs_t* outGpuCompositionDoneTime,
         nsecs_t* outDisplayPresentTime, nsecs_t* outDisplayRetireTime,
         nsecs_t* outDequeueReadyTime, nsecs_t* outReleaseTime) {
     ATRACE_CALL();
@@ -274,7 +274,7 @@
     // Update our cache of events if the requested events are not available.
     if (checkConsumerForUpdates(events, mLastFrameNumber,
             outLatchTime, outFirstRefreshStartTime, outLastRefreshStartTime,
-            outGlCompositionDoneTime, outDisplayPresentTime,
+            outGpuCompositionDoneTime, outDisplayPresentTime,
             outDisplayRetireTime, outDequeueReadyTime, outReleaseTime)) {
         FrameEventHistoryDelta delta;
         mGraphicBufferProducer->getFrameTimestamps(&delta);
@@ -296,7 +296,7 @@
 
     getFrameTimestampFence(outAcquireTime, events->acquireFence);
     getFrameTimestampFence(
-            outGlCompositionDoneTime, events->gpuCompositionDoneFence);
+            outGpuCompositionDoneTime, events->gpuCompositionDoneFence);
     getFrameTimestampFence(
             outDisplayPresentTime, events->displayPresentFence);
     getFrameTimestampFence(outDisplayRetireTime, events->displayRetireFence);
@@ -1032,7 +1032,7 @@
     nsecs_t* outLatchTime = va_arg(args, int64_t*);
     nsecs_t* outFirstRefreshStartTime = va_arg(args, int64_t*);
     nsecs_t* outLastRefreshStartTime = va_arg(args, int64_t*);
-    nsecs_t* outGlCompositionDoneTime = va_arg(args, int64_t*);
+    nsecs_t* outGpuCompositionDoneTime = va_arg(args, int64_t*);
     nsecs_t* outDisplayPresentTime = va_arg(args, int64_t*);
     nsecs_t* outDisplayRetireTime = va_arg(args, int64_t*);
     nsecs_t* outDequeueReadyTime = va_arg(args, int64_t*);
@@ -1040,7 +1040,7 @@
     return getFrameTimestamps(frameId,
             outRequestedPresentTime, outAcquireTime, outLatchTime,
             outFirstRefreshStartTime, outLastRefreshStartTime,
-            outGlCompositionDoneTime, outDisplayPresentTime,
+            outGpuCompositionDoneTime, outDisplayPresentTime,
             outDisplayRetireTime, outDequeueReadyTime, outReleaseTime);
 }
 
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index 5298027..ceeb90a 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -364,7 +364,7 @@
                 FrameEvent::LATCH,
                 FrameEvent::FIRST_REFRESH_START,
                 FrameEvent::LAST_REFRESH_START,
-                FrameEvent::GL_COMPOSITION_DONE,
+                FrameEvent::GPU_COMPOSITION_DONE,
                 FrameEvent::DEQUEUE_READY,
                 FrameEvent::RELEASE
         };
diff --git a/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h
index 6572cab..3cb7322 100644
--- a/opengl/include/EGL/eglext.h
+++ b/opengl/include/EGL/eglext.h
@@ -640,7 +640,7 @@
 #define EGL_COMPOSITION_LATCH_TIME_ANDROID 0x3153
 #define EGL_FIRST_COMPOSITION_START_TIME_ANDROID 0x3154
 #define EGL_LAST_COMPOSITION_START_TIME_ANDROID 0x3155
-#define EGL_FIRST_COMPOSITION_FINISHED_TIME_ANDROID 0x3156
+#define EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID 0x3156
 #define EGL_DISPLAY_PRESENT_TIME_ANDROID 0x3157
 #define EGL_DISPLAY_RETIRE_TIME_ANDROID 0x3158
 #define EGL_DEQUEUE_READY_TIME_ANDROID 0x3159
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 4681b89..32818f0 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -2197,7 +2197,7 @@
     nsecs_t* acquireTime = nullptr;
     nsecs_t* latchTime = nullptr;
     nsecs_t* firstRefreshStartTime = nullptr;
-    nsecs_t* GLCompositionDoneTime = nullptr;
+    nsecs_t* gpuCompositionDoneTime = nullptr;
     nsecs_t* lastRefreshStartTime = nullptr;
     nsecs_t* displayPresentTime = nullptr;
     nsecs_t* displayRetireTime = nullptr;
@@ -2221,8 +2221,8 @@
             case EGL_LAST_COMPOSITION_START_TIME_ANDROID:
                 lastRefreshStartTime = &values[i];
                 break;
-            case EGL_FIRST_COMPOSITION_FINISHED_TIME_ANDROID:
-                GLCompositionDoneTime = &values[i];
+            case EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID:
+                gpuCompositionDoneTime = &values[i];
                 break;
             case EGL_DISPLAY_PRESENT_TIME_ANDROID:
                 displayPresentTime = &values[i];
@@ -2243,7 +2243,7 @@
 
     status_t ret = native_window_get_frame_timestamps(s->win.get(), frameId,
             requestedPresentTime, acquireTime, latchTime, firstRefreshStartTime,
-            lastRefreshStartTime, GLCompositionDoneTime, displayPresentTime,
+            lastRefreshStartTime, gpuCompositionDoneTime, displayPresentTime,
             displayRetireTime, dequeueReadyTime, releaseTime);
 
     switch (ret) {
@@ -2294,7 +2294,7 @@
         case EGL_COMPOSITION_LATCH_TIME_ANDROID:
         case EGL_FIRST_COMPOSITION_START_TIME_ANDROID:
         case EGL_LAST_COMPOSITION_START_TIME_ANDROID:
-        case EGL_FIRST_COMPOSITION_FINISHED_TIME_ANDROID:
+        case EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID:
         case EGL_DEQUEUE_READY_TIME_ANDROID:
         case EGL_READS_DONE_TIME_ANDROID:
             return EGL_TRUE;
diff --git a/opengl/specs/EGL_ANDROID_get_frame_timestamps.txt b/opengl/specs/EGL_ANDROID_get_frame_timestamps.txt
index d0ed8e1..e32d9e6 100644
--- a/opengl/specs/EGL_ANDROID_get_frame_timestamps.txt
+++ b/opengl/specs/EGL_ANDROID_get_frame_timestamps.txt
@@ -90,7 +90,7 @@
     EGL_COMPOSITION_LATCH_TIME_ANDROID 0x3153
     EGL_FIRST_COMPOSITION_START_TIME_ANDROID 0x3154
     EGL_LAST_COMPOSITION_START_TIME_ANDROID 0x3155
-    EGL_FIRST_COMPOSITION_FINISHED_TIME_ANDROID 0x3156
+    EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID 0x3156
     EGL_DISPLAY_PRESENT_TIME_ANDROID 0x3157
     EGL_DISPLAY_RETIRE_TIME_ANDROID 0x3158
     EGL_DEQUEUE_READY_TIME_ANDROID 0x3159
@@ -189,10 +189,10 @@
           that indicates the subsequent frame was not submitted in time to be
           latched by the compositor. Note: The value may not be updated for
           every display refresh if the compositor becomes idle.
-        - EGL_FIRST_COMPOSITION_FINISHED_TIME_ANDROID - The time at which the
-          compositor's rendering work for this frame finished. This will be zero
-          if composition was handled by the display and the compositor didn't do
-          any rendering.
+        - EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID - The time at which
+          the compositor's rendering work for this frame finished. This will be
+          zero if composition was handled by the display and the compositor
+          didn't do any rendering.
         - EGL_DISPLAY_PRESENT_TIME_ANDROID - The time at which this frame
           started to scan out to the physical display.
         - EGL_DISPLAY_RETIRE_TIME_ANDROID - The time at which this frame was
diff --git a/opengl/specs/README b/opengl/specs/README
index 0c49023..a7a9785 100644
--- a/opengl/specs/README
+++ b/opengl/specs/README
@@ -28,7 +28,7 @@
 0x3153               EGL_COMPOSITION_LATCH_TIME_ANDROID (EGL_ANDROID_get_frame_timestamps)
 0x3154               EGL_FIRST_COMPOSITION_START_TIME_ANDROID (EGL_ANDROID_get_frame_timestamps)
 0x3155               EGL_LAST_COMPOSITION_START_TIME_ANDROID (EGL_ANDROID_get_frame_timestamps)
-0x3156               EGL_FIRST_COMPOSITION_FINISHED_TIME_ANDROID (EGL_ANDROID_get_frame_timestamps)
+0x3156               EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID (EGL_ANDROID_get_frame_timestamps)
 0x3157               EGL_DISPLAY_PRESENT_TIME_ANDROID (EGL_ANDROID_get_frame_timestamps)
 0x3158               EGL_DISPLAY_RETIRE_TIME_ANDROID (EGL_ANDROID_get_frame_timestamps)
 0x3159               EGL_DEQUEUE_READY_TIME_ANDROID (EGL_ANDROID_get_frame_timestamps)
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index d2dddba..0ad6287 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -649,7 +649,7 @@
         FrameEvent::LATCH,
         FrameEvent::FIRST_REFRESH_START,
         FrameEvent::LAST_REFRESH_START,
-        FrameEvent::GL_COMPOSITION_DONE,
+        FrameEvent::GPU_COMPOSITION_DONE,
         getHwComposer().presentFenceRepresentsStartOfScanout() ?
                 FrameEvent::DISPLAY_PRESENT : FrameEvent::DISPLAY_RETIRE,
         FrameEvent::DEQUEUE_READY,
diff --git a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
index 477eb27..e6ab29a 100644
--- a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
+++ b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
@@ -640,7 +640,7 @@
         FrameEvent::LATCH,
         FrameEvent::FIRST_REFRESH_START,
         FrameEvent::LAST_REFRESH_START,
-        FrameEvent::GL_COMPOSITION_DONE,
+        FrameEvent::GPU_COMPOSITION_DONE,
         FrameEvent::DISPLAY_RETIRE,
         FrameEvent::DEQUEUE_READY,
         FrameEvent::RELEASE,