diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-10 01:07:11 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-10 01:07:11 +0000 |
commit | 0064adf9f128374d9c8ec6cfe22845c46bedd072 (patch) | |
tree | 0fc13272143c01b53e56a65fbb2769c4fdc4d53b /libs/hwui/renderthread/CanvasContext.cpp | |
parent | 65b6baa27991d3d2c2d7b8c729ad11733673ace0 (diff) | |
parent | 23ee1b87bb87301a8f2f8044603b29141ae76a69 (diff) |
Snap for 7625910 from 23ee1b87bb87301a8f2f8044603b29141ae76a69 to sc-release
Change-Id: Ie4f54c1939e4c67742037aab0131a6bac86aea21
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 025be7b2b6c1..2f3a509831d1 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -482,6 +482,12 @@ nsecs_t CanvasContext::draw() { if (dirty.isEmpty() && Properties::skipEmptyFrames && !surfaceRequiresRedraw()) { mCurrentFrameInfo->addFlag(FrameInfoFlags::SkippedFrame); + if (auto grContext = getGrContext()) { + // Submit to ensure that any texture uploads complete and Skia can + // free its staging buffers. + grContext->flushAndSubmit(); + } + // Notify the callbacks, even if there's nothing to draw so they aren't waiting // indefinitely waitOnFences(); |