Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b27f52e4 authored by Derek Sollenberger's avatar Derek Sollenberger Committed by Automerger Merge Worker
Browse files

Merge "CanvasContext::draw: flushAndSubmit when not drawing" into sc-dev am:...

Merge "CanvasContext::draw: flushAndSubmit when not drawing" into sc-dev am: 1171be08 am: 71417b2d

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

Change-Id: Ia55f43fe9352699a06899088523ce0e8d7dccea6
parents 3d778714 71417b2d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -483,6 +483,12 @@ nsecs_t CanvasContext::draw() {
    if (!Properties::isDrawingEnabled() ||
        (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();