summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsContext.cpp')
-rw-r--r--libs/rs/rsContext.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 8f56efa..11f26b9 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -142,6 +142,13 @@ uint32_t Context::runScript(Script *s, uint32_t launchID)
return ret;
}
+void Context::checkError(const char *msg) const
+{
+ GLenum err = glGetError();
+ if (err != GL_NO_ERROR) {
+ LOGE("GL Error, 0x%x, from %s", err, msg);
+ }
+}
uint32_t Context::runRootScript()
{
@@ -169,11 +176,7 @@ uint32_t Context::runRootScript()
mStateFragmentStore.mLast.clear();
uint32_t ret = runScript(mRootScript.get(), 0);
- GLenum err = glGetError();
- if (err != GL_NO_ERROR) {
- LOGE("Pending GL Error, 0x%x", err);
- }
-
+ checkError("runRootScript");
return ret;
}
@@ -340,10 +343,6 @@ void * Context::threadProc(void *vrsc)
rsc->mObjDestroy.mNeedToEmpty = true;
rsc->objDestroyOOBRun();
- glClearColor(0,0,0,0);
- glClear(GL_COLOR_BUFFER_BIT);
- eglSwapBuffers(rsc->mEGL.mDisplay, rsc->mEGL.mSurface);
-
pthread_mutex_lock(&gInitMutex);
rsc->deinitEGL();
pthread_mutex_unlock(&gInitMutex);