diff options
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 10 |
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 */ |