diff options
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r-- | src/core/SkBitmap.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index d3bbecd706..128726cb63 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. |