Merge "CanvasContext::draw: flushAndSubmit when not drawing" into sc-dev am: 1171be085c am: 973eac4b05

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15481327

Change-Id: I692ae8e5726d74e154d29ce9ebcda06a36d74e67
This commit is contained in:
Derek Sollenberger
2021-08-09 13:21:47 +00:00
committed by Automerger Merge Worker

View File

@@ -482,6 +482,12 @@ nsecs_t CanvasContext::draw() {
if (dirty.isEmpty() && Properties::skipEmptyFrames && !surfaceRequiresRedraw()) { if (dirty.isEmpty() && Properties::skipEmptyFrames && !surfaceRequiresRedraw()) {
mCurrentFrameInfo->addFlag(FrameInfoFlags::SkippedFrame); 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 // Notify the callbacks, even if there's nothing to draw so they aren't waiting
// indefinitely // indefinitely
waitOnFences(); waitOnFences();