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

Unified Diff: include/core/SkScalar.h

Issue 1893433002: In SkDraw::drawRect, use SkPath for huge rects. Base URL: https://skia.googlesource.com/skia@fixed-assert
Patch Set: Created 4 years, 8 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 | « include/core/SkRegion.h ('k') | src/core/SkAAClip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkScalar.h
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h
index b2d966cb3bbf79daba3cdd5beb6b4728afd0b2a2..b3ac022410abec77c5ef8453b635bb0e492c4ba9 100644
--- a/include/core/SkScalar.h
+++ b/include/core/SkScalar.h
@@ -30,6 +30,9 @@ typedef float SkScalar;
#define SK_ScalarInfinity SK_FloatInfinity
#define SK_ScalarNegativeInfinity SK_FloatNegativeInfinity
#define SK_ScalarNaN SK_FloatNaN
+// This is the largest number <= SK_MaxS32 that can be round-trip converted between SkScalar and
+// int32_t.
+#define SK_MaxS32Scalar 2.14748352e+9f
#define SkScalarFloorToScalar(x) sk_float_floor(x)
#define SkScalarCeilToScalar(x) sk_float_ceil(x)
@@ -70,6 +73,7 @@ typedef double SkScalar;
#define SK_ScalarInfinity SK_DoubleInfinity
#define SK_ScalarNegativeInfinity SK_DoubleNegativeInfinity
#define SK_ScalarNaN SK_DoubleNaN
+#define SK_MaxS32Scalar SkIntToScalar(SK_MaxS32)
#define SkScalarFloorToScalar(x) floor(x)
#define SkScalarCeilToScalar(x) ceil(x)
« no previous file with comments | « include/core/SkRegion.h ('k') | src/core/SkAAClip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698