Remove extra glFlush from handleMessageRefresh().

For BufferQueueLayers, the GL flush fence was already passed to
BufferLayerConsumer::addReleaseFence during post composition for buffer
synchronization when releasing a buffer, so passing the same fence isn't
necessary.

For BufferStateLayers, this fence shouldn't be necessary for merging
with the buffer's acquire fence in latchBuffer, since buffer readiness
for the current buffer shouldn't depend on whether the prior buffer was
finished being used in gpu composition.

So, the fence returned by the extra glFlush call isn't necessary, so we
can just remove the call + plumbing entirely.

Bug: 117103118
Change-Id: Iafeb33dab46213f711ee2ecb59731d003263a551
Test: apct tests, go/wm-smoke, cts
Test: chrome debug apk
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index c077b68..b4952aa 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -380,8 +380,7 @@
     return true;
 }
 
-bool BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime,
-                              const sp<Fence>& releaseFence) {
+bool BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime) {
     ATRACE_CALL();
 
     bool refreshRequired = latchSidebandStream(recomputeVisibleRegions);
@@ -420,7 +419,7 @@
         return false;
     }
 
-    status_t err = updateTexImage(recomputeVisibleRegions, latchTime, releaseFence);
+    status_t err = updateTexImage(recomputeVisibleRegions, latchTime);
     if (err != NO_ERROR) {
         return false;
     }