Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index 005da229c70d6671b9695b71529654ffbd4fb1f8..d80d0f511ef3e790f4527e0f009a3c15db61aafc 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -1353,8 +1353,8 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap, |
SkRect dstRect(srcRect); |
SkRect paintRect; |
- SkScalar wInv = SkScalarInvert(SkIntToScalar(bitmap.width())); |
- SkScalar hInv = SkScalarInvert(SkIntToScalar(bitmap.height())); |
+ SkScalar wInv = SkScalarInvert(SkIntToScalar(texture->width())); |
+ SkScalar hInv = SkScalarInvert(SkIntToScalar(texture->height())); |
paintRect.setLTRB(SkScalarMul(srcRect.fLeft, wInv), |
SkScalarMul(srcRect.fTop, hInv), |
SkScalarMul(srcRect.fRight, wInv), |
@@ -1388,14 +1388,14 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap, |
// Use a constrained texture domain to avoid color bleeding |
SkScalar left, top, right, bottom; |
if (srcRect.width() > SK_Scalar1) { |
- SkScalar border = SK_ScalarHalf / bitmap.width(); |
+ SkScalar border = SK_ScalarHalf / texture->width(); |
left = paintRect.left() + border; |
right = paintRect.right() - border; |
} else { |
left = right = SkScalarHalf(paintRect.left() + paintRect.right()); |
} |
if (srcRect.height() > SK_Scalar1) { |
- SkScalar border = SK_ScalarHalf / bitmap.height(); |
+ SkScalar border = SK_ScalarHalf / texture->height(); |
top = paintRect.top() + border; |
bottom = paintRect.bottom() - border; |
} else { |