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

Commit 1cd7e4c3 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Use path intersection instead of saveLayer+mesh to mask projected ripples" into mnc-dev

parents 5cd795a9 fca52b75
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -189,6 +189,9 @@ void CanvasState::setClippingRoundRect(LinearAllocator& allocator,
    mSnapshot->setClippingRoundRect(allocator, rect, radius, highPriority);
}

void CanvasState::setProjectionPathMask(LinearAllocator& allocator, const SkPath* path) {
    mSnapshot->setProjectionPathMask(allocator, path);
}

///////////////////////////////////////////////////////////////////////////////
// Quick Rejection
+1 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ public:
    void setClippingOutline(LinearAllocator& allocator, const Outline* outline);
    void setClippingRoundRect(LinearAllocator& allocator,
            const Rect& rect, float radius, bool highPriority = true);
    void setProjectionPathMask(LinearAllocator& allocator, const SkPath* path);

    /**
     * Returns true if drawing in the rectangle (left, top, right, bottom)
+1 −0
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@ public:
        // Identical round rect clip state means both ops will clip in the same way, or not at all.
        // As the state objects are const, we can compare their pointers to determine mergeability
        if (lhs->mRoundRectClipState != rhs->mRoundRectClipState) return false;
        if (lhs->mProjectionPathMask != rhs->mProjectionPathMask) return false;

        /* Clipping compatibility check
         *
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ public:
    mat4 mMatrix;
    float mAlpha;
    const RoundRectClipState* mRoundRectClipState;
    const ProjectionPathMask* mProjectionPathMask;
};

class OpStatePair {
+6 −0
Original line number Diff line number Diff line
@@ -134,6 +134,12 @@ public:

    uint8_t getType() const;

    void multiplyInverse(const Matrix4& v) {
        Matrix4 inv;
        inv.loadInverse(v);
        multiply(inv);
    }

    void multiply(const Matrix4& v) {
        Matrix4 u;
        u.loadMultiply(*this, v);
Loading