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

Commit 27be0189 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Refactor GLFunctorDrawable to use new SkCanvas API for clip region"

parents 99695b0f 98d251b1
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
#include "RenderNode.h"
#include "SkClipStack.h"
#include <private/hwui/DrawGlInfo.h>
#include <SkPath.h>
#include <GrContext.h>

namespace android {
@@ -76,9 +75,7 @@ void GLFunctorDrawable::onDraw(SkCanvas* canvas) {

    //apply a simple clip with a scissor or a complex clip with a stencil
    SkRegion clipRegion;
    SkPath path;
    canvas->getClipStack()->asPath(&path);
    clipRegion.setPath(path, SkRegion(ibounds));
    canvas->temporary_internal_getRgnClip(&clipRegion);
    if (CC_UNLIKELY(clipRegion.isComplex())) {
        //It is only a temporary solution to use a scissor to draw the stencil.
        //There is a bug 31489986 to implement efficiently non-rectangular clips.