aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/hugepath.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-10 14:31:18 -0500
committerGravatar Mike Reed <reed@google.com>2018-01-10 20:39:33 +0000
commitd284949b595e2d7c6c6901c5b49e822a02a4d79f (patch)
tree7aebd5fb935638ba85f34112ccb3f9b39fd039a8 /gm/hugepath.cpp
parent5366e59e8826a235d25f34f50ae1b93ee9675663 (diff)
restore intersect methods to use old-style empty-checks on their inputs
Bug introduced when we made isEmpty check for int32_t width/height Bug:800804 Change-Id: I59799c88fb02f176c1545dd0edae050b510df079 Reviewed-on: https://skia-review.googlesource.com/93302 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'gm/hugepath.cpp')
-rw-r--r--gm/hugepath.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/gm/hugepath.cpp b/gm/hugepath.cpp
new file mode 100644
index 0000000000..dbca413093
--- /dev/null
+++ b/gm/hugepath.cpp
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2018 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "gm.h"
+#include "SkCanvas.h"
+#include "SkPath.h"
+
+DEF_SIMPLE_GM(path_huge_crbug_800804, canvas, 30, 600) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(1);
+ SkPath path;
+ path.moveTo(-1000,12345678901234567890.f);
+ path.lineTo(10.5f,200);
+ canvas->drawPath(path, paint);
+
+ path.reset();
+ path.moveTo(20.5f,400);
+ path.lineTo(1000,-9.8765432109876543210e+19f);
+ canvas->drawPath(path, paint);
+}
+