| Index: Source/platform/graphics/GraphicsContext.cpp
|
| diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
|
| index b51203fb649a04edd422aeaa76bd7d161e30f250..0ccd200c59a9ee5f0e77d7b3019760403be62a22 100644
|
| --- a/Source/platform/graphics/GraphicsContext.cpp
|
| +++ b/Source/platform/graphics/GraphicsContext.cpp
|
| @@ -465,6 +465,9 @@ bool GraphicsContext::concat(const SkMatrix& matrix)
|
| if (paintingDisabled())
|
| return false;
|
|
|
| + if (matrix.isIdentity())
|
| + return true;
|
| +
|
| realizeSave(SkCanvas::kMatrix_SaveFlag);
|
|
|
| return m_canvas->concat(matrix);
|
| @@ -1587,6 +1590,9 @@ void GraphicsContext::translate(float w, float h)
|
| if (paintingDisabled())
|
| return;
|
|
|
| + if (!w && !h)
|
| + return;
|
| +
|
| realizeSave(SkCanvas::kMatrix_SaveFlag);
|
|
|
| m_canvas->translate(WebCoreFloatToSkScalar(w), WebCoreFloatToSkScalar(h));
|
| @@ -1597,6 +1603,9 @@ void GraphicsContext::scale(const FloatSize& size)
|
| if (paintingDisabled())
|
| return;
|
|
|
| + if (size.width() == 1.0f && size.height() == 1.0f)
|
| + return;
|
| +
|
| realizeSave(SkCanvas::kMatrix_SaveFlag);
|
|
|
| m_canvas->scale(WebCoreFloatToSkScalar(size.width()), WebCoreFloatToSkScalar(size.height()));
|
|
|