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

Unified Diff: src/core/SkBitmap.cpp

Issue 24159009: Add SkDivMod with a special case for ARM. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: appease gcc on 10.6 Created 7 years, 3 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/SkMath.h ('k') | src/core/SkScaledImageCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index d3bbecd7066dfe4d826d5bd778e635c1e5215910..128726cb63d9198477afd698e377c6ee02cef6ed 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -911,9 +911,8 @@ bool get_upper_left_from_offset(SkBitmap::Config config, size_t offset, size_t r
return true;
}
// Use integer division to find the correct y position.
- *y = SkToS32(offset / rowBytes);
// The remainder will be the x position, after we reverse get_sub_offset.
- *x = SkToS32(offset % rowBytes);
+ SkTDivMod(offset, rowBytes, y, x);
switch (config) {
case SkBitmap::kA8_Config:
// Fall through.
« no previous file with comments | « include/core/SkMath.h ('k') | src/core/SkScaledImageCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698