modify gm to have a non-uniform donut for testing
git-svn-id: http://skia.googlecode.com/svn/trunk@6477 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp
index 57e5679..5a0dab6 100644
--- a/gm/blurrect.cpp
+++ b/gm/blurrect.cpp
@@ -28,15 +28,34 @@
static void draw_donut(SkCanvas* canvas, const SkRect& r, const SkPaint& p) {
SkRect rect;
SkPath path;
-
+
rect = r;
rect.outset(STROKE_WIDTH/2, STROKE_WIDTH/2);
path.addRect(rect);
rect = r;
rect.inset(STROKE_WIDTH/2, STROKE_WIDTH/2);
+
path.addRect(rect);
path.setFillType(SkPath::kEvenOdd_FillType);
+
+ canvas->drawPath(path, p);
+}
+static void draw_donut_skewed(SkCanvas* canvas, const SkRect& r, const SkPaint& p) {
+ SkRect rect;
+ SkPath path;
+
+ rect = r;
+ rect.outset(STROKE_WIDTH/2, STROKE_WIDTH/2);
+ path.addRect(rect);
+ rect = r;
+ rect.inset(STROKE_WIDTH/2, STROKE_WIDTH/2);
+
+ rect.offset(7, -7);
+
+ path.addRect(rect);
+ path.setFillType(SkPath::kEvenOdd_FillType);
+
canvas->drawPath(path, p);
}
@@ -65,7 +84,7 @@
paint.setMaskFilter(fMaskFilter);
static const Proc procs[] = {
- fill_rect, stroke_rect, draw_donut
+ fill_rect, draw_donut, draw_donut_skewed
};
SkRect r = { 0, 0, 250, 120 };