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

Unified Diff: gm/rrects.cpp

Issue 171413004: Analytic rrect clip for cicular corners, radius >= .5 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: minor comment improvement Created 6 years, 10 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
Index: gm/rrects.cpp
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index 299e8d8d9b92d2f2193e85c96ad27c9d486d764b..2e2aefc61811799160fe85622c027eec534bb4d2 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -74,6 +74,11 @@ protected:
fRRects[0].setRect(SkRect::MakeWH(kTileX-2, kTileY-2));
fRRects[1].setOval(SkRect::MakeWH(kTileX-2, kTileY-2));
fRRects[2].setRectXY(SkRect::MakeWH(kTileX-2, kTileY-2), 10, 10);
+ fRRects[3].setRectXY(SkRect::MakeWH(kTileX-2, kTileY-2), 10, 5);
+ // small circular corners are an interesting test case for gpu clipping
+ fRRects[4].setRectXY(SkRect::MakeWH(kTileX-2, kTileY-2), 1, 1);
+ fRRects[5].setRectXY(SkRect::MakeWH(kTileX-2, kTileY-2), 0.5, 0.5);
+ fRRects[6].setRectXY(SkRect::MakeWH(kTileX-2, kTileY-2), 0.2, 0.2);
// The first complex case needs special handling since it is a square
fRRects[kNumSimpleCases].setRectRadii(SkRect::MakeWH(kTileY-2, kTileY-2), gRadii[0]);
@@ -92,7 +97,7 @@ private:
static const int kTileX = 80;
static const int kTileY = 40;
- static const int kNumSimpleCases = 3;
+ static const int kNumSimpleCases = 7;
static const int kNumComplexCases = 19;
static const SkVector gRadii[kNumComplexCases][4];

Powered by Google App Engine
This is Rietveld 408576698