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

Unified Diff: src/core/SkMallocPixelRef.cpp

Issue 122283002: Revert of remove Sk64 from public API, and start to remove usage internally (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/SkBitmap.cpp ('k') | src/core/SkMipMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMallocPixelRef.cpp
diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp
index 9e2ea9c9803c6475b02263325a9bc2fbbc958726..b65197fac852ae7e5dceb3bf4ed4764dc92cd087 100644
--- a/src/core/SkMallocPixelRef.cpp
+++ b/src/core/SkMallocPixelRef.cpp
@@ -64,12 +64,13 @@
rowBytes = minRB;
}
- int64_t bigSize = (int64_t)info.fHeight * rowBytes;
- if (!sk_64_isS32(bigSize)) {
+ Sk64 bigSize;
+ bigSize.setMul(info.fHeight, rowBytes);
+ if (!bigSize.is32()) {
return NULL;
}
- size_t size = sk_64_asS32(bigSize);
+ size_t size = bigSize.get32();
void* addr = sk_malloc_flags(size, 0);
if (NULL == addr) {
return NULL;
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/core/SkMipMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698