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

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

Merge "Solve translucency issue when drawing paths." into honeycomb

parents 0c848553 32228288
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -197,10 +197,16 @@ PathTexture* PathCache::addTexture(const PathCacheEntry& entry,
    bitmap.eraseColor(0);

    SkPaint pathPaint(*paint);
    if (!pathPaint.getXfermode()) {

    // Make sure the paint is opaque, color, alpha, filter, etc.
    // will be applied later when compositing the alpha8 texture
    pathPaint.setColor(0xff000000);
    pathPaint.setAlpha(255);
    pathPaint.setColorFilter(NULL);
    pathPaint.setMaskFilter(NULL);
    pathPaint.setShader(NULL);
    SkXfermode* mode = SkXfermode::Create(SkXfermode::kSrc_Mode);
    pathPaint.setXfermode(mode)->safeUnref();
    }

    SkCanvas canvas(bitmap);
    canvas.translate(-bounds.fLeft + offset, -bounds.fTop + offset);