aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-17 19:22:07 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-17 19:22:07 +0000
commite1ca705cac4b946993f6cbf798e2a0ba27e739f3 (patch)
tree9757af858cadeea671264651780935b00d8c0252 /tests
parent3fb15f4d21292a319dc6522bfc99c89a7a5eac68 (diff)
deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients
BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/111353003 git-svn-id: http://skia.googlecode.com/svn/trunk@12719 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/PathCoverageTest.cpp6
-rw-r--r--tests/PathOpsExtendedTest.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/PathCoverageTest.cpp b/tests/PathCoverageTest.cpp
index ede1fdc64e..25b5fd1c09 100644
--- a/tests/PathCoverageTest.cpp
+++ b/tests/PathCoverageTest.cpp
@@ -27,8 +27,8 @@ static const uint32_t MAX_POINTS_PER_CURVE = 1 << MAX_COEFF_SHIFT;
// For determining the maximum possible number of points to use in
// drawing a quadratic, we want to err on the high side.
static inline int cheap_distance(SkScalar dx, SkScalar dy) {
- int idx = SkAbs32(SkScalarRound(dx));
- int idy = SkAbs32(SkScalarRound(dy));
+ int idx = SkAbs32(SkScalarRoundToInt(dx));
+ int idy = SkAbs32(SkScalarRoundToInt(dy));
if (idx > idy) {
idx += idy >> 1;
} else {
@@ -79,7 +79,7 @@ static uint32_t quadraticPointCount_EC(const SkPoint points[], SkScalar tol) {
static uint32_t quadraticPointCount_CE(const SkPoint points[]) {
SkScalar distance = compute_distance(points);
- return estimate_pointCount(SkScalarRound(distance));
+ return estimate_pointCount(SkScalarRoundToInt(distance));
}
static uint32_t quadraticPointCount_CC(const SkPoint points[], SkScalar tol) {
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index ca6f86507d..1083a897e1 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -347,11 +347,11 @@ bool drawAsciiPaths(const SkPath& one, const SkPath& two, bool drawPaths) {
larger.join(bounds2);
SkBitmap bits;
char out[256];
- int bitWidth = SkScalarCeil(larger.width()) + 2;
+ int bitWidth = SkScalarCeilToInt(larger.width()) + 2;
if (bitWidth * 2 + 1 >= (int) sizeof(out)) {
return false;
}
- int bitHeight = SkScalarCeil(larger.height()) + 2;
+ int bitHeight = SkScalarCeilToInt(larger.height()) + 2;
if (bitHeight >= (int) sizeof(out)) {
return false;
}