aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-09 18:32:51 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-09 18:32:51 +0000
commit633722ec44ad28261dfaee38a3a8acebefb3ce68 (patch)
tree905489742f5ae7a892e64b80ee702b1091c16a50
parente28b917669fc4677b2f1c0a08c4711b651cbf1a1 (diff)
Small miter limit check on Gr::drawRect.
-rw-r--r--src/gpu/SkGpuDevice.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 874ed8e422..deb817cd37 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -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;
}