disable coverage optimization for hairlines
The coverage blitter is an optimization of regular blitting to A8. It can go faster because it never tries to blend with itself... because it was intended to be called only by fill-path, which is written to never draw twice in the same place. Hairlines don't make this promise, so we can use the coverage optimization for hairlines. Change-Id: I0a4816f886462017ad81378d5928357ef038ae8f Reviewed-on: https://skia-review.googlesource.com/18666 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
5ab7276a35
commit
65cfb5ecbc
@ -84,7 +84,9 @@ public:
|
||||
*/
|
||||
void drawPathCoverage(const SkPath& src, const SkPaint& paint,
|
||||
SkBlitter* customBlitter = NULL) const {
|
||||
this->drawPath(src, paint, NULL, false, true, customBlitter);
|
||||
bool isHairline = paint.getStyle() == SkPaint::kStroke_Style &&
|
||||
paint.getStrokeWidth() > 0;
|
||||
this->drawPath(src, paint, NULL, false, !isHairline, customBlitter);
|
||||
}
|
||||
|
||||
/** Helper function that creates a mask from a path and an optional maskfilter.
|
||||
|
Loading…
Reference in New Issue
Block a user