Defer EGL init until the surface changed call comes in. Pass w,h along with surface for verification of driver state.
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index bffc55b..f3803a5 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -49,7 +49,7 @@
class Context
{
public:
- Context(Device *, Surface *, bool useDepth);
+ Context(Device *, bool useDepth);
~Context();
static pthread_key_t gThreadTLSKey;
@@ -94,7 +94,7 @@
void pause();
void resume();
- void setSurface(Surface *sur);
+ void setSurface(uint32_t w, uint32_t h, Surface *sur);
void assignName(ObjectBase *obj, const char *name, uint32_t len);
void removeName(ObjectBase *obj);
@@ -189,6 +189,9 @@
} mGL;
+ uint32_t mWidth;
+ uint32_t mHeight;
+
bool mRunning;
bool mExit;
bool mUseDepth;