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

Commit 9ffe9ed7 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: f832270a

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

Change-Id: Ifa1f36f173e02a657776eca2741672280e335e19
parents dcfd49f3 f832270a
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -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();