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

Unified Diff: src/core/SkMask.cpp

Issue 136673002: remove remaining references to Sk64 (obsolete) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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/core/SkGraphics.cpp ('k') | src/core/SkMath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMask.cpp
diff --git a/src/core/SkMask.cpp b/src/core/SkMask.cpp
index 09744194b9d6f553e31c962b004d354e0a2de64c..f3ae88a906a9c2c929d69557e66cd4110f40bcac 100644
--- a/src/core/SkMask.cpp
+++ b/src/core/SkMask.cpp
@@ -5,18 +5,15 @@
* found in the LICENSE file.
*/
-
-#include "Sk64.h"
#include "SkMask.h"
/** returns the product if it is positive and fits in 31 bits. Otherwise this
returns 0.
*/
static int32_t safeMul32(int32_t a, int32_t b) {
- Sk64 size;
- size.setMul(a, b);
- if (size.is32() && size.isPos()) {
- return size.get32();
+ int64_t size = sk_64_mul(a, b);
+ if (size > 0 && sk_64_isS32(size)) {
+ return sk_64_asS32(size);
}
return 0;
}
« no previous file with comments | « src/core/SkGraphics.cpp ('k') | src/core/SkMath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698