| Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| index 7817508e0f0baa41bd67ae0d89099f6e0cf975f7..85d7b036f383842cf18de830f29591a9e24d8b9b 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| @@ -830,10 +830,18 @@ PaintResult PaintLayerPainter::PaintFragmentByApplyingTransform(
|
| delta.MoveBy(fragment_translation);
|
| TransformationMatrix transform(
|
| paint_layer_.RenderableTransform(painting_info.GetGlobalPaintFlags()));
|
| - IntPoint rounded_delta = RoundedIntPoint(delta);
|
| - transform.PostTranslate(rounded_delta.X(), rounded_delta.Y());
|
| - LayoutSize adjusted_sub_pixel_accumulation =
|
| - painting_info.sub_pixel_accumulation + (delta - rounded_delta);
|
| + LayoutSize adjusted_sub_pixel_accumulation;
|
| + if (transform.IsIdentityOrTranslation()) {
|
| + IntPoint rounded_delta = RoundedIntPoint(delta);
|
| + transform.PostTranslate(rounded_delta.X(), rounded_delta.Y());
|
| + adjusted_sub_pixel_accumulation =
|
| + painting_info.sub_pixel_accumulation + (delta - rounded_delta);
|
| + } else {
|
| + // We can't pass subpixel offsets through a non-translation transform.
|
| + // Bake the offsets into the transform instead.
|
| + delta += painting_info.sub_pixel_accumulation;
|
| + transform.PostTranslate(delta.X().ToDouble(), delta.Y().ToDouble());
|
| + }
|
|
|
| // TODO(jbroman): Put the real transform origin here, instead of using a
|
| // matrix with the origin baked in.
|
|
|