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

Commit dad85fb7 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Apply the clip rect/region to drawLines()"

parents 6c971bfa d71ff91d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2145,6 +2145,11 @@ status_t OpenGLRenderer::drawLines(float* points, int count, SkPaint* paint) {
    VertexBuffer buffer;
    SkRect bounds;
    PathTessellator::tessellateLines(points, count, paint, mSnapshot->transform, bounds, buffer);

    if (quickReject(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom)) {
        return DrawGlInfo::kStatusDone;
    }

    dirtyLayer(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom, *mSnapshot->transform);

    bool useOffset = !paint->isAntiAlias();
@@ -2166,6 +2171,7 @@ status_t OpenGLRenderer::drawPoints(float* points, int count, SkPaint* paint) {
        strokeWidth = 1.0f;
    }
    const float halfWidth = strokeWidth / 2;

    int alpha;
    SkXfermode::Mode mode;
    getAlphaAndMode(paint, &alpha, &mode);