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
This commit is contained in:
commit-bot@chromium.org 2014-03-24 14:53:09 +00:00
parent 08f6d86f8e
commit 04eff72bf0

View File

@ -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 } },
};
///////////////////////////////////////////////////////////////////////////////