Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: gm/rrects.cpp

Issue 203963010: Add test cases for small radii to rrect GMs (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: comment change Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rrects.cpp
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index b89c79ff6b5a936e957bf5e8d9f2b66aad142df0..0dc70b190d2e7c0e6f2ab1d3b1a9ec1f545871fd 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 } },
+
};
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698