aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-01 11:54:29 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-01 11:54:29 +0000
commita0fd1b340736587aa082d6c5613546477b47b013 (patch)
tree362110d566192519fba3102b68815019fa1dd1de
parent18bb41e9563748fbde07c1540da9314cbb7d1dc8 (diff)
add some GM tests for rects
BUG= R=robertphillips@google.com, bsalomon@google.com Author: yunchao.he@intel.com Review URL: https://codereview.chromium.org/54213002 git-svn-id: http://skia.googlecode.com/svn/trunk@12073 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--expectations/gm/ignored-tests.txt3
-rw-r--r--gm/rects.cpp41
2 files changed, 44 insertions, 0 deletions
diff --git a/expectations/gm/ignored-tests.txt b/expectations/gm/ignored-tests.txt
index f13e44a84f..2cea9b0c51 100644
--- a/expectations/gm/ignored-tests.txt
+++ b/expectations/gm/ignored-tests.txt
@@ -39,3 +39,6 @@ pdf-poppler
# Added by bsalomon in https://codereview.chromium.org/31033002
verylargebitmap
+
+# Added by yunchao in https://codereview.chromium.org/54213002
+rects
diff --git a/gm/rects.cpp b/gm/rects.cpp
index fb70dd76b4..febf553aa1 100644
--- a/gm/rects.cpp
+++ b/gm/rects.cpp
@@ -50,6 +50,15 @@ protected:
}
{
+ // AA with translucent
+ SkPaint p;
+ p.setColor(SK_ColorWHITE);
+ p.setAntiAlias(true);
+ p.setAlpha(0x66);
+ fPaints.push_back(p);
+ }
+
+ {
// AA with mask filter
SkPaint p;
p.setColor(SK_ColorWHITE);
@@ -108,6 +117,28 @@ protected:
}
{
+ // AA with bevel-stroke style
+ SkPaint p;
+ p.setColor(SK_ColorWHITE);
+ p.setAntiAlias(true);
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeJoin(SkPaint::kBevel_Join);
+ p.setStrokeWidth(SkIntToScalar(3));
+ fPaints.push_back(p);
+ }
+
+ {
+ // AA with round-stroke style
+ SkPaint p;
+ p.setColor(SK_ColorWHITE);
+ p.setAntiAlias(true);
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeJoin(SkPaint::kRound_Join);
+ p.setStrokeWidth(SkIntToScalar(3));
+ fPaints.push_back(p);
+ }
+
+ {
// AA with stroke style, width = 0
SkPaint p;
p.setColor(SK_ColorWHITE);
@@ -117,6 +148,16 @@ protected:
}
{
+ // AA with stroke style, width wider than rect width and/or height
+ SkPaint p;
+ p.setColor(SK_ColorWHITE);
+ p.setAntiAlias(true);
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeWidth(SkIntToScalar(40));
+ fPaints.push_back(p);
+ }
+
+ {
// AA with stroke and fill style
SkPaint p;
p.setColor(SK_ColorWHITE);