summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/RenderEngine/RenderEngine.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/RenderEngine/RenderEngine.h')
-rw-r--r--services/surfaceflinger/RenderEngine/RenderEngine.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.h b/services/surfaceflinger/RenderEngine/RenderEngine.h
index 3c7f9ab..577dc0a 100644
--- a/services/surfaceflinger/RenderEngine/RenderEngine.h
+++ b/services/surfaceflinger/RenderEngine/RenderEngine.h
@@ -25,6 +25,8 @@
#include <EGL/eglext.h>
#include <ui/mat4.h>
+#define EGL_NO_CONFIG ((EGLConfig)0)
+
// ---------------------------------------------------------------------------
namespace android {
// ---------------------------------------------------------------------------
@@ -44,8 +46,9 @@ class RenderEngine {
};
static GlesVersion parseGlesVersion(const char* str);
+ EGLConfig mEGLConfig;
EGLContext mEGLContext;
- void setEGLContext(EGLContext ctxt);
+ void setEGLHandles(EGLConfig config, 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;
@@ -55,7 +58,9 @@ protected:
virtual ~RenderEngine() = 0;
public:
- static RenderEngine* create(EGLDisplay display, EGLConfig config);
+ static RenderEngine* create(EGLDisplay display, int hwcFormat);
+
+ static EGLConfig chooseEglConfig(EGLDisplay display, int format);
// dump the extension strings. always call the base class.
virtual void dump(String8& result);
@@ -107,6 +112,7 @@ public:
virtual size_t getMaxTextureSize() const = 0;
virtual size_t getMaxViewportDims() const = 0;
+ EGLConfig getEGLConfig() const;
EGLContext getEGLContext() const;
};