Move eglSwapBuffers out of HWComposer

Commit 8630320 moved the eglSwapBuffers fallback (for devices with no
HWC implementation) from DisplayHardware to HWComposer. But HWComposer
only knows about the framebuffer EGL display and surface handles if
there is a HWC, so it was always passing bogus handles.

This change moves the eglSwapBuffers fallback up to SurfaceFlinger,
which has access to the framebuffer EGL handles.

Bug: 6886613
Change-Id: Iad3f5ff7c90ee48d7053999e6a4548d6794b6ebd
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index c2fff4f..ca41bd3 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -20,8 +20,6 @@
 #include <stdint.h>
 #include <sys/types.h>
 
-#include <EGL/egl.h>
-
 #include <hardware/hwcomposer_defs.h>
 
 #include <utils/Condition.h>
@@ -63,9 +61,6 @@
 
     status_t initCheck() const;
 
-    // tells the HAL what the framebuffer is
-    void setFrameBuffer(EGLDisplay dpy, EGLSurface sur);
-
     // Asks the HAL what it can do
     status_t prepare() const;
 
@@ -73,7 +68,7 @@
     status_t disable();
 
     // commits the list
-    status_t commit() const;
+    status_t commit(void* fbDisplay, void* fbSurface) const;
 
     // release hardware resources and blank screen
     status_t release() const;
@@ -234,8 +229,6 @@
     size_t                          mCapacity;
     mutable size_t                  mNumOVLayers;
     mutable size_t                  mNumFBLayers;
-    EGLDisplay                      mDpy;
-    EGLSurface                      mSur;
     cb_context*                     mCBContext;
     EventHandler&                   mEventHandler;
     nsecs_t                         mRefreshPeriod;