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

Unified Diff: tests/PathTest.cpp

Issue 803153003: Fix rrects that are large enough that we lose/gain a bit when we add the radius to a bounds coordin… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove dead code Created 6 years 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 | « src/core/SkRRect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 1a74682e546e967ac322b61ba76ca1de9f2d7411..de7e4a65cc09864851290169f6a2464a39d84f41 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -21,6 +21,26 @@
#include "SkWriter32.h"
#include "Test.h"
+static void test_skbug_3239(skiatest::Reporter* reporter) {
+ const SkRect rect = SkRect::MakeLTRB(SkBits2Float(0xcb7f16c8), /* -16717512.000000 */
+ SkBits2Float(0xcb7f16c8), /* -16717512.000000 */
+ SkBits2Float(0x4b7f1c1d), /* 16718877.000000 */
+ SkBits2Float(0x4b7f1bd7)); /* 16718807.000000 */
robertphillips 2014/12/15 19:13:21 Can we test the four variants having the huge radi
reed1 2014/12/15 19:58:28 Done.
+ const SkVector radii[] = {
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+ { 33436320, 33436320 },
+ };
+ SkRRect rrect;
+ rrect.setRectRadii(rect, radii);
+
+ SkPath path;
+ // this line should not assert in the debug build (from validate)
+ path.addRRect(rrect);
+ REPORTER_ASSERT(reporter, rrect.rect() == path.getBounds());
+}
+
static void make_path_crbug364224(SkPath* path) {
path->reset();
path->moveTo(3.747501373f, 2.724499941f);
@@ -3729,4 +3749,5 @@ DEF_TEST(Paths, reporter) {
PathRefTest_Private::TestPathRef(reporter);
test_dump(reporter);
test_path_crbugskia2820(reporter);
+ test_skbug_3239(reporter);
}
« no previous file with comments | « src/core/SkRRect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698