diff options
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 0ade8dde12eb..e14842f89b61 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -84,6 +84,19 @@ void RenderProxy::setSurface(ANativeWindow* window, bool enableTimeout) { }); } +void RenderProxy::setSurfaceControl(ASurfaceControl* surfaceControl) { + auto funcs = mRenderThread.getASurfaceControlFunctions(); + if (surfaceControl) { + funcs.acquireFunc(surfaceControl); + } + mRenderThread.queue().post([this, control = surfaceControl, funcs]() mutable { + mContext->setSurfaceControl(control); + if (control) { + funcs.releaseFunc(control); + } + }); +} + void RenderProxy::allocateBuffers() { mRenderThread.queue().post([=]() { mContext->allocateBuffers(); }); } |