aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/aaa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/aaa.cpp')
-rw-r--r--gm/aaa.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/gm/aaa.cpp b/gm/aaa.cpp
index 614ff84258..4f81fc9a2c 100644
--- a/gm/aaa.cpp
+++ b/gm/aaa.cpp
@@ -123,6 +123,22 @@ protected:
p.setStrokeWidth(5);
canvas->drawPath(path, p);
canvas->restore();
+
+
+ // The following two paths test if we correctly cumulates the alpha on the middle pixel
+ // column where the left rect and the right rect abut.
+ p.setStyle(SkPaint::kFill_Style);
+ canvas->translate(0, 300);
+ path.reset();
+ path.addRect({20, 20, 100.4999f, 100});
+ path.addRect({100.5001f, 20, 200, 100});
+ canvas->drawPath(path, p);
+
+ canvas->translate(300, 0);
+ path.reset();
+ path.addRect({20, 20, 100.1f, 100});
+ path.addRect({100.9f, 20, 200, 100});
+ canvas->drawPath(path, p);
}
private: