summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 25badac..34f1961 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -170,6 +170,18 @@ void RenderProxy::detachFunctor(Functor* functor) {
post(task);
}
+CREATE_BRIDGE2(runWithGlContext, CanvasContext* context, RenderTask* task) {
+ args->context->runWithGlContext(args->task);
+ return NULL;
+}
+
+void RenderProxy::runWithGlContext(RenderTask* gltask) {
+ SETUP_TASK(runWithGlContext);
+ args->context = mContext;
+ args->task = gltask;
+ postAndWait(task);
+}
+
MethodInvokeRenderTask* RenderProxy::createTask(RunnableMethod method) {
// TODO: Consider having a small pool of these to avoid alloc churn
return new MethodInvokeRenderTask(method);