Index: src/gpu/SkGpuDevice_drawTexture.cpp |
diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp |
index ccc9e2a2dd0da91dc8763c2fedee02d6e073b888..534414548b793e3b85b23b42e287f745ee133551 100644 |
--- a/src/gpu/SkGpuDevice_drawTexture.cpp |
+++ b/src/gpu/SkGpuDevice_drawTexture.cpp |
@@ -59,9 +59,9 @@ static const SkScalar kColorBleedTolerance = 0.001f; |
static bool has_aligned_samples(const SkRect& srcRect, const SkRect& transformedRect) { |
// detect pixel disalignment |
- if (SkScalarAbs(SkScalarFraction(transformedRect.left())) < kColorBleedTolerance && |
- SkScalarAbs(SkScalarFraction(transformedRect.top())) < kColorBleedTolerance && |
- SkScalarAbs(transformedRect.width() - srcRect.width()) < kColorBleedTolerance && |
+ if (SkScalarAbs(SkScalarRoundToScalar(transformedRect.left()) - transformedRect.left()) < kColorBleedTolerance && |
+ SkScalarAbs(SkScalarRoundToScalar(transformedRect.top()) - transformedRect.top()) < kColorBleedTolerance && |
+ SkScalarAbs(transformedRect.width() - srcRect.width()) < kColorBleedTolerance && |
SkScalarAbs(transformedRect.height() - srcRect.height()) < kColorBleedTolerance) { |
return true; |
} |