RS Error cleanup.
Thow java exception during init if the
GL driver fails rather than native crash.
Change-Id: Ie96ef5a2ac12e64f9456545d86157c4c95179a8e
diff --git a/rsContext.h b/rsContext.h
index e269d4e..2017ceb 100644
--- a/rsContext.h
+++ b/rsContext.h
@@ -69,7 +69,7 @@
class Context
{
public:
- Context(Device *, const RsSurfaceConfig *sc);
+ static Context * createContext(Device *, const RsSurfaceConfig *sc);
~Context();
static pthread_key_t gThreadTLSKey;
@@ -276,9 +276,10 @@
private:
Context();
+ bool initContext(Device *, const RsSurfaceConfig *sc);
- void initEGL();
- void initGLThread();
+
+ bool initGLThread();
void deinitEGL();
uint32_t runRootScript();