Refactor SF. Move all GL operations in their own class.

this is the first step to add support for GLES 2.x, this
change breaks the dependency of SF on GLES 1.x by moving
all operation into their own class.

Bug: 8679321

Change-Id: I0d2741eca2cefe67dfd9cf837cac10c4d126928b
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index f79bf2d..e7e9585 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -22,8 +22,6 @@
 
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
 
 #include <utils/RefBase.h>
 #include <utils/String8.h>
@@ -55,7 +53,6 @@
 class DisplayDevice;
 class GraphicBuffer;
 class SurfaceFlinger;
-class GLExtensions;
 
 // ---------------------------------------------------------------------------
 
@@ -113,14 +110,15 @@
 
     class LayerMesh {
         friend class Layer;
-        GLfloat mVertices[4][2];
+        typedef GLfloat float2[2];
+        float2 mVertices[4];
         size_t mNumVertices;
     public:
         LayerMesh() :
                 mNumVertices(4) {
         }
-        GLfloat const* getVertices() const {
-            return &mVertices[0][0];
+        float2 const* getVertices() const {
+            return mVertices;
         }
         size_t getVertexCount() const {
             return mNumVertices;
@@ -355,7 +353,6 @@
     String8 mName;
     mutable bool mDebug;
     PixelFormat mFormat;
-    const GLExtensions& mGLExtensions;
     bool mOpaqueLayer;
 
     // these are protected by an external lock