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

Commit 70116da7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "GLFunctorDrawable: skip alpha filtering" into tm-dev am: ec839b2e

parents 7dd058e5 ec839b2e
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -61,6 +61,17 @@ void GLFunctorDrawable::onDraw(SkCanvas* canvas) {
        return;
    }

    // canvas may be an AlphaFilterCanvas, which is intended to draw with a
    // modified alpha. We do not have a way to do this without drawing into an
    // extra layer, which would have a performance cost. Draw directly into the
    // underlying gpu canvas. This matches prior behavior and the behavior in
    // Vulkan.
    {
        auto* gpuCanvas = SkAndroidFrameworkUtils::getBaseWrappedCanvas(canvas);
        LOG_ALWAYS_FATAL_IF(!gpuCanvas, "GLFunctorDrawable::onDraw is using an invalid canvas!");
        canvas = gpuCanvas;
    }

    // flush will create a GrRenderTarget if not already present.
    canvas->flush();