Bug 832446 - Don't use the high-quality downscaler on multipart images. r=jrmuizel

This commit is contained in:
Joe Drew 2013-01-21 11:37:54 -05:00
Родитель 67f10d0c36
Коммит 2f0327ee73
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -2905,8 +2905,10 @@ RasterImage::CanScale(gfxPattern::GraphicsFilter aFilter,
{
// The high-quality scaler requires Skia.
#ifdef MOZ_ENABLE_SKIA
// We don't use the scaler for animated or multipart images to avoid doing a
// bunch of work on an image that just gets thrown away.
if (gHQDownscaling && aFilter == gfxPattern::FILTER_GOOD &&
!mAnim && mDecoded && IsDownscale(aScale)) {
!mAnim && mDecoded && !mMultipart && IsDownscale(aScale)) {
gfxFloat factor = gHQDownscalingMinFactor / 1000.0;
return (aScale.width < factor || aScale.height < factor);
}