fix the visual difference of raster vs gpu -- inverse_paths
If a path has no verbs, it is empty. If a path has verbs, but both the width and height of the bounds are zero. the path is empty too. This situation happens when you add an empty rect or circle... , say a rect{x, y, width, height} = {100, 100, 0, 0}, to a path. For 8888 config, drawPath() checked the bounds. For gpu config, it doesn't. BUG=skia:2176 R=reed@google.com, bsalomon@google.com, schenney@chromium.org Author: yunchao.he@intel.com Review URL: https://codereview.chromium.org/166023002 git-svn-id: http://skia.googlecode.com/svn/trunk@13526 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
25c7127c90
commit
0b45dc45d6
@ -81,3 +81,6 @@ downsamplebitmap_text_none_72.00pt
|
||||
bleed
|
||||
bitmaprecttest
|
||||
drawbitmapmatrix
|
||||
|
||||
# Added by yunchao.he@intel.com for https://codereview.chromium.org/166023002
|
||||
inverse_paths
|
||||
|
@ -1787,7 +1787,9 @@ void SkCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (path.isEmpty()) {
|
||||
|
||||
const SkRect& r = path.getBounds();
|
||||
if (r.width() <= 0 && r.height() <= 0) {
|
||||
if (path.isInverseFillType()) {
|
||||
this->internalDrawPaint(paint);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user