SurfaceFlinger now uses GLES 2.x when available

Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
diff --git a/libs/gui/GLConsumer.cpp b/libs/gui/GLConsumer.cpp
index 482317f..0a2afbf 100644
--- a/libs/gui/GLConsumer.cpp
+++ b/libs/gui/GLConsumer.cpp
@@ -89,8 +89,8 @@
 Mutex GLConsumer::sStaticInitLock;
 sp<GraphicBuffer> GLConsumer::sReleasedTexImageBuffer;
 
-GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, GLuint tex,
-        GLenum texTarget, bool useFenceSync, bool isControlledByApp) :
+GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex,
+        uint32_t texTarget, bool useFenceSync, bool isControlledByApp) :
     ConsumerBase(bq, isControlledByApp),
     mCurrentTransform(0),
     mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
@@ -523,7 +523,7 @@
     return OK;
 }
 
-status_t GLConsumer::attachToContext(GLuint tex) {
+status_t GLConsumer::attachToContext(uint32_t tex) {
     ATRACE_CALL();
     ST_LOGV("attachToContext");
     Mutex::Autolock lock(mMutex);
@@ -554,7 +554,7 @@
 
     // We need to bind the texture regardless of whether there's a current
     // buffer.
-    glBindTexture(mTexTarget, tex);
+    glBindTexture(mTexTarget, GLuint(tex));
 
     if (mCurrentTextureBuf != NULL) {
         // The EGLImageKHR that was associated with the slot was destroyed when
@@ -689,7 +689,7 @@
     return false;
 }
 
-GLenum GLConsumer::getCurrentTextureTarget() const {
+uint32_t GLConsumer::getCurrentTextureTarget() const {
     return mTexTarget;
 }