Implement missing safelyRun() on ThreadedRenderer
Change-Id: I14b75f37a13fabaa759a51369190dbdc84087c4b
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 @@
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 */