diff options
author | Jorim Jaggi <jjaggi@google.com> | 2018-07-17 15:24:16 +0200 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2018-07-17 17:34:49 +0200 |
commit | 7823ee73ee504fcb5b0448b0b8f1b4804309df45 (patch) | |
tree | f8da6181ceba92bf79e44981bf8305bcb1cd862b /libs/hwui/renderthread/RenderProxy.cpp | |
parent | 0c84996a12ace0a81ecfeb5f3a79e55127a06af0 (diff) |
Move allocateBuffers to RT
Such that it gets executed after setSurface, in order that
mReqUsage has the correct flags set.
Test: Take trace, ensure that allocateBuffers actually allocates
in the right format/usage by ensuring that dequeueBuffer doesn't
trash them immediately again.
Bug: 111517695
Change-Id: I94b402d7b29d565155a77a2d09106246261712d2
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 59048be768e9..020761110ef0 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -87,6 +87,11 @@ void RenderProxy::initialize(const sp<Surface>& surface) { [ this, surf = surface ]() mutable { mContext->setSurface(std::move(surf)); }); } +void RenderProxy::allocateBuffers(const sp<Surface>& surface) { + mRenderThread.queue().post( + [ surf = surface ]() mutable { surf->allocateBuffers(); }); +} + void RenderProxy::updateSurface(const sp<Surface>& surface) { mRenderThread.queue().post( [ this, surf = surface ]() mutable { mContext->setSurface(std::move(surf)); }); |