Fix ES2 composition on some devices

- turns out fragment shaders don't have default precision by default
- GLES 1.x extensions that became core in GLES 2.0 don't always work
  as extensions in GLES 2.0 (!)

Bug: 8679321
Change-Id: I5a4a93e158247910399325a965af5d2e3bbece9b
diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.h b/services/surfaceflinger/RenderEngine/RenderEngine.h
index f4fa30b..3c2b2ea 100644
--- a/services/surfaceflinger/RenderEngine/RenderEngine.h
+++ b/services/surfaceflinger/RenderEngine/RenderEngine.h
@@ -45,6 +45,9 @@
     EGLContext mEGLContext;
     void setEGLContext(EGLContext ctxt);
 
+    virtual void bindImageAsFramebuffer(EGLImageKHR image, uint32_t* texName, uint32_t* fbName, uint32_t* status) = 0;
+    virtual void unbindFramebuffer(uint32_t texName, uint32_t fbName) = 0;
+
 protected:
     RenderEngine();
     virtual ~RenderEngine() = 0;
@@ -52,6 +55,9 @@
 public:
     static RenderEngine* create(EGLDisplay display, EGLConfig config);
 
+    // dump the extension strings. always call the base class.
+    virtual void dump(String8& result);
+
     // helpers
     void clearWithColor(float red, float green, float blue, float alpha);
     void fillRegionWithColor(const Region& region, uint32_t height,
@@ -65,8 +71,8 @@
 
     class BindImageAsFramebuffer {
         RenderEngine& mEngine;
-        unsigned int mTexName, mFbName;
-        unsigned int mStatus;
+        uint32_t mTexName, mFbName;
+        uint32_t mStatus;
     public:
         BindImageAsFramebuffer(RenderEngine& engine, EGLImageKHR image);
         ~BindImageAsFramebuffer();
@@ -75,7 +81,6 @@
 
     // set-up
     virtual void checkErrors() const;
-    virtual void dump(String8& result) = 0;
     virtual void setViewportAndProjection(size_t vpw, size_t vph, size_t w, size_t h, bool yswap) = 0;
     virtual void setupLayerBlending(bool premultipliedAlpha, bool opaque, int alpha) = 0;
     virtual void setupDimLayerBlending(int alpha) = 0;