summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-10 01:07:11 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-10 01:07:11 +0000
commit0064adf9f128374d9c8ec6cfe22845c46bedd072 (patch)
tree0fc13272143c01b53e56a65fbb2769c4fdc4d53b /libs/hwui/renderthread/CanvasContext.cpp
parent65b6baa27991d3d2c2d7b8c729ad11733673ace0 (diff)
parent23ee1b87bb87301a8f2f8044603b29141ae76a69 (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.cpp6
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();