summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-02-11 10:40:25 -0800
committerJohn Reck <jreck@google.com>2014-02-11 10:40:25 -0800
commitfc53ef27793a39e9effd829e9cae02a9ca14147e (patch)
tree0269d0943677006ad8fdf981bd5eaa70bc9631f1 /libs/hwui/renderthread/CanvasContext.cpp
parentf6eebb21d5c58345eca8be25676e34346f5809b2 (diff)
downloadframeworks_base-fc53ef27793a39e9effd829e9cae02a9ca14147e.zip
frameworks_base-fc53ef27793a39e9effd829e9cae02a9ca14147e.tar.gz
frameworks_base-fc53ef27793a39e9effd829e9cae02a9ca14147e.tar.bz2
Implement missing safelyRun() on ThreadedRenderer
Change-Id: I14b75f37a13fabaa759a51369190dbdc84087c4b
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index a848c8f..4e665d9 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -462,6 +462,16 @@ void CanvasContext::queueFunctorsTask(int delayMs) {
mRenderThread.queueDelayed(&mInvokeFunctorsTask, delayMs);
}
+void CanvasContext::runWithGlContext(RenderTask* task) {
+ if (mEglSurface != EGL_NO_SURFACE) {
+ mGlobalContext->makeCurrent(mEglSurface);
+ } else {
+ mGlobalContext->usePBufferSurface();
+ }
+
+ task->run();
+}
+
} /* namespace renderthread */
} /* namespace uirenderer */
} /* namespace android */