hwc: Remove call to glFinish

It had a glFinish which is not needed anymore on HWC 1.1

Bug: 7274951
Change-Id: I1389802a0ed3f0199d7d7ba0110a343b2f571106
Acked-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index a03f4cd..f5c3013 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -299,26 +299,6 @@
     return 0;
 }
 
-static bool isGpuUsed(hwc_context_t *ctx,
-        size_t numDisplays,
-        hwc_display_contents_1_t** displays)
-{
-    bool isUsed = false;
-    for (uint32_t i = 0; i < numDisplays; i++) {
-        hwc_display_contents_1_t* list = displays[i];
-        if (list && list->numHwLayers) {
-            uint32_t last = list->numHwLayers - 1;
-            hwc_layer_1_t *fbLayer = &list->hwLayers[last];
-            if(!(fbLayer->flags & HWC_SKIP_LAYER)) {
-                isUsed = true;
-                break;
-            }
-
-        }
-    }
-    return isUsed;
-}
-
 static int hwc_set(hwc_composer_device_1 *dev,
                    size_t numDisplays,
                    hwc_display_contents_1_t** displays)
@@ -327,11 +307,6 @@
     hwc_context_t* ctx = (hwc_context_t*)(dev);
     Locker::Autolock _l(ctx->mBlankLock);
 
-    if(isGpuUsed(ctx, numDisplays, displays)) {
-        //Call glFinish, only if gpu is used
-        ctx->mFbDev->compositionComplete(ctx->mFbDev);
-    }
-
     for (uint32_t i = 0; i < numDisplays; i++) {
         hwc_display_contents_1_t* list = displays[i];
         switch(i) {