Small miter limit check on Gr::drawRect.

http://codereview.appspot.com/4838057/



git-svn-id: http://skia.googlecode.com/svn/trunk@2086 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bungeman@google.com 2011-08-09 18:32:51 +00:00
parent e28b917669
commit 633722ec44

View File

@ -762,8 +762,13 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect,
if (!usePath && paint.isAntiAlias() && !draw.fMatrix->rectStaysRect()) {
usePath = true;
}
// small miter limit means right angles show bevel...
if (SkPaint::kMiter_Join == paint.getStrokeJoin() &&
paint.getStrokeMiter() < SK_ScalarSqrt2)
{
usePath = true;
}
// until we can both stroke and fill rectangles
// with large enough miter limit...
if (paint.getStyle() == SkPaint::kStrokeAndFill_Style) {
usePath = true;
}