Index: src/core/SkScaledImageCache.cpp |
diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp |
index 5a772a7cd502681ea558acfd1dba98b4b86a289b..fc3148bdd8807a31f0660c7f45b36e78bdcd1f41 100644 |
--- a/src/core/SkScaledImageCache.cpp |
+++ b/src/core/SkScaledImageCache.cpp |
@@ -369,10 +369,8 @@ static SkIRect get_bounds_from_bitmap(const SkBitmap& bm) { |
if (!(bm.pixelRef())) { |
return SkIRect::MakeEmpty(); |
} |
- size_t x, y; |
- SkTDivMod(bm.pixelRefOffset(), bm.rowBytes(), &y, &x); |
- x >>= bm.shiftPerPixel(); |
- return SkIRect::MakeXYWH(x, y, bm.width(), bm.height()); |
+ SkIPoint origin = bm.pixelRefOrigin(); |
+ return SkIRect::MakeXYWH(origin.fX, origin.fY, bm.width(), bm.height()); |
} |