summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
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();