| Index: Source/core/rendering/ImageQualityController.cpp
|
| diff --git a/Source/core/rendering/ImageQualityController.cpp b/Source/core/rendering/ImageQualityController.cpp
|
| index c9bdae70ea909590f357431089115d51c5025062..e69b1cffc935013a5d022b9d32478f507d8a6fff 100644
|
| --- a/Source/core/rendering/ImageQualityController.cpp
|
| +++ b/Source/core/rendering/ImageQualityController.cpp
|
| @@ -60,6 +60,21 @@ void ImageQualityController::remove(RenderObject* renderer)
|
| }
|
| }
|
|
|
| +InterpolationQuality ImageQualityController::chooseInterpolationQuality(GraphicsContext* context, RenderObject* object, Image* image, const void* layer, const LayoutSize& layoutSize)
|
| +{
|
| + if (InterpolationDefault == InterpolationLow)
|
| + return InterpolationLow;
|
| +
|
| + if (shouldPaintAtLowQuality(context, object, image, layer, layoutSize))
|
| + return InterpolationLow;
|
| +
|
| + // For images that are potentially animated we paint them at medium quality.
|
| + if (image && image->maybeAnimated())
|
| + return InterpolationMedium;
|
| +
|
| + return InterpolationDefault;
|
| +}
|
| +
|
| ImageQualityController::~ImageQualityController()
|
| {
|
| // This will catch users of ImageQualityController that forget to call cleanUp.
|
| @@ -137,10 +152,6 @@ bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R
|
| if (object->style()->imageRendering() == ImageRenderingOptimizeContrast)
|
| return true;
|
|
|
| - // For images that are potentially animated we paint them at low quality.
|
| - if (image->maybeAnimated())
|
| - return true;
|
| -
|
| // Look ourselves up in the hashtables.
|
| ObjectLayerSizeMap::iterator i = m_objectLayerSizeMap.find(object);
|
| LayerSizeMap* innerMap = i != m_objectLayerSizeMap.end() ? &i->value : 0;
|
|
|