aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-24 14:53:09 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-24 14:53:09 +0000
commit04eff72bf0d80392148ce7bb4967a9647ed5475c (patch)
tree8df57de67ae48e3e6a64467da6b5fb60333b4edd /gm
parent08f6d86f8e6aa19f6f2702b106fcfaa89d760869 (diff)
Add test cases for small radii to rrect GMs.
BUG=skia:2181 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/203963010 git-svn-id: http://skia.googlecode.com/svn/trunk@13905 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/rrects.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index b89c79ff6b..0dc70b190d 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -185,7 +185,7 @@ private:
static const int kTileY = 40;
static const int kNumSimpleCases = 7;
- static const int kNumComplexCases = 29;
+ static const int kNumComplexCases = 35;
static const SkVector gRadii[kNumComplexCases][4];
static const int kNumRRects = kNumSimpleCases + kNumComplexCases;
@@ -235,6 +235,10 @@ const SkVector RRectGM::gRadii[kNumComplexCases][4] = {
{ { 0, 0 }, { 0, 0 }, { 20, 20 }, { 20, 20 } },
{ { 20, 20 }, { 0, 0 }, { 0, 0 }, { 20, 20 } },
+ // small radius circular corner tabs
+ { { 0, 0 }, { 0.2f, 0.2f }, { 0.2f, 0.2f }, { 0, 0 } },
+ { { 0.3f, 0.3f }, { 0.3f, .3f }, { 0, 0 }, { 0, 0 } },
+
// single circular corner cases
{ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 15, 15 } },
{ { 0, 0 }, { 0, 0 }, { 15, 15 }, { 0, 0 } },
@@ -244,6 +248,13 @@ const SkVector RRectGM::gRadii[kNumComplexCases][4] = {
// nine patch elliptical
{ { 5, 7 }, { 8, 7 }, { 8, 12 }, { 5, 12 } },
{ { 0, 7 }, { 8, 7 }, { 8, 12 }, { 0, 12 } },
+
+ // nine patch elliptical, small radii
+ { { 0.4f, 7 }, { 8, 7 }, { 8, 12 }, { 0.4f, 12 } },
+ { { 0.4f, 0.4f }, { 8, 0.4f }, { 8, 12 }, { 0.4f, 12 } },
+ { { 20, 0.4f }, { 18, 0.4f }, { 18, 0.4f }, { 20, 0.4f } },
+ { { 0.3f, 0.4f }, { 0.3f, 0.4f }, { 0.3f, 0.4f }, { 0.3f, 0.4f } },
+
};
///////////////////////////////////////////////////////////////////////////////