Chromium Code Reviews| Index: Source/core/rendering/RenderHTMLCanvas.cpp |
| diff --git a/Source/core/rendering/RenderHTMLCanvas.cpp b/Source/core/rendering/RenderHTMLCanvas.cpp |
| index 41a294209064a7e9999a021ad08e49db18a7d5c8..1aa23b1323f013123e407ad7c3ee5f95934c1d7c 100644 |
| --- a/Source/core/rendering/RenderHTMLCanvas.cpp |
| +++ b/Source/core/rendering/RenderHTMLCanvas.cpp |
| @@ -67,7 +67,18 @@ void RenderHTMLCanvas::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& pa |
| // FIXME: InterpolationNone should be used if ImageRenderingOptimizeContrast is set. |
| // See bug for more details: crbug.com/353716. |
| - InterpolationQuality interpolationQuality = style()->imageRendering() == ImageRenderingOptimizeContrast ? InterpolationLow : CanvasDefaultInterpolationQuality; |
| + InterpolationQuality interpolationQuality; |
| + switch (style()->imageRendering()) { |
| + case ImageRenderingOptimizeContrast: |
| + interpolationQuality = InterpolationLow; |
|
Mike Lawther (Google)
2014/06/20 04:26:50
These should really be the same, ie InterpolationN
jackhou
2014/06/20 07:14:44
Done.
jackhou
2014/06/20 08:35:42
I realized this would require updating all the tes
|
| + break; |
| + case ImageRenderingPixelated: |
| + interpolationQuality = InterpolationNone; |
|
Mike Lawther (Google)
2014/06/20 04:26:50
Strictly according to spec, we only use nearest ne
jackhou
2014/06/20 07:14:44
Done.
|
| + break; |
| + default: |
| + interpolationQuality = CanvasDefaultInterpolationQuality; |
| + } |
| + |
| InterpolationQuality previousInterpolationQuality = context->imageInterpolationQuality(); |
| context->setImageInterpolationQuality(interpolationQuality); |
| toHTMLCanvasElement(node())->paint(context, paintRect); |