Index: Source/platform/graphics/BitmapImage.cpp |
diff --git a/Source/platform/graphics/BitmapImage.cpp b/Source/platform/graphics/BitmapImage.cpp |
index f49218a73039395d4a07b235440cd70a30863cf2..4c5da02252452d84d462551b470ae78967fe727f 100644 |
--- a/Source/platform/graphics/BitmapImage.cpp |
+++ b/Source/platform/graphics/BitmapImage.cpp |
@@ -50,7 +50,7 @@ PassRefPtr<BitmapImage> BitmapImage::createWithOrientationForTesting(const SkBit |
RefPtr<BitmapImage> result = adoptRef(new BitmapImage(bitmap)); |
result->m_frames[0].m_orientation = orientation; |
if (orientation.usesWidthAsHeight()) |
- result->m_sizeRespectingOrientation = IntSize(result->m_size.height(), result->m_size.width()); |
+ result->m_sizeRespectingOrientation = result->m_size.transposedSize(); |
return result.release(); |
} |
@@ -298,7 +298,7 @@ void BitmapImage::draw(SkCanvas* canvas, const SkPaint& paint, const FloatRect& |
if (orientation.usesWidthAsHeight()) { |
// The destination rect will have it's width and height already reversed for the orientation of |
// the image, as it was needed for page layout, so we need to reverse it back here. |
- adjustedDstRect = FloatRect(adjustedDstRect.x(), adjustedDstRect.y(), adjustedDstRect.height(), adjustedDstRect.width()); |
leviw_travelin_and_unemployed
2015/08/14 22:34:14
The old code wasn't actually a transposedRect, as
|
+ adjustedDstRect = adjustedDstRect.transposedRect(); |
} |
} |