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

Unified Diff: src/utils/SkNinePatch.cpp

Issue 1135693003: Revert of Revert of stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « src/utils/SkInterpolator.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkNinePatch.cpp
diff --git a/src/utils/SkNinePatch.cpp b/src/utils/SkNinePatch.cpp
index 4e0d1d1a39b3a3a923e55723ccfcbce97ffdb493..ce8d4801c60d398ba77eb83c58f8954237fbc99e 100644
--- a/src/utils/SkNinePatch.cpp
+++ b/src/utils/SkNinePatch.cpp
@@ -161,7 +161,7 @@
if (bounds.width() >= fixed)
stretchX = (bounds.width() - fixed) / stretchSize;
else // reuse stretchX, but keep it negative as a signal
- stretchX = SkScalarDiv(-bounds.width(), fixed);
+ stretchX = -bounds.width() / fixed;
}
if (numYStretch > 0) {
@@ -173,7 +173,7 @@
if (bounds.height() >= fixed)
stretchY = (bounds.height() - fixed) / stretchSize;
else // reuse stretchX, but keep it negative as a signal
- stretchY = SkScalarDiv(-bounds.height(), fixed);
+ stretchY = -bounds.height() / fixed;
}
#if 0
« no previous file with comments | « src/utils/SkInterpolator.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698