aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDraw.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-04 14:47:09 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-04 14:47:09 +0000
commit5bff8d2030ec976cd5081b759a495cc28e79deb6 (patch)
treee33e1e2a9a427e24bbcbd47fa2070c3479df9fb1 /src/core/SkDraw.cpp
parent7ff678bc1618dc669648198a7bdca8adfb189505 (diff)
add #ifdef SK_DISABLE_FAST_AA_STROKE_RECT to disable new 8x faster antialiased
stroked rects, since it draws slightly different (more correct) pixels, for clients that want pixel compatibility. git-svn-id: http://skia.googlecode.com/svn/trunk@1043 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r--src/core/SkDraw.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 604155aae3..68a0e4d76a 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -718,6 +718,11 @@ void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {
} else if (zeroWidth) {
rtype = kHair_RectType;
} else if (easy_rect_join(paint)) {
+#ifdef SK_DISABLE_FAST_AA_STROKE_RECT
+ if (paint.isAntiAlias()) {
+ rtype = kPath_RectType;
+ } else
+#endif
rtype = kStroke_RectType;
} else {
rtype = kPath_RectType;