Changeset 195415 in webkit


Ignore:
Timestamp:
Jan 21, 2016 11:00:33 AM (8 years ago)
Author:
Simon Fraser
Message:

GraphicsContext: low quality drawImage and drawImageBuffer should use InterpolationLow
https://bugs.webkit.org/show_bug.cgi?id=49002

Reviewed by Chris Dumez.

When using low quality image scaling for images which are getting painted often,
the code used InterpolationNone, which make the images look even worse than they should.

Not easily testable.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawImageBuffer):
(WebCore::GraphicsContext::drawConsumingImageBuffer):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r195412 r195415  
     12016-01-21  Simon Fraser  <simon.fraser@apple.com>
     2
     3        GraphicsContext: low quality drawImage and drawImageBuffer should use InterpolationLow
     4        https://bugs.webkit.org/show_bug.cgi?id=49002
     5
     6        Reviewed by Chris Dumez.
     7
     8        When using low quality image scaling for images which are getting painted often,
     9        the code used InterpolationNone, which make the images look even worse than they should.
     10
     11        Not easily testable.
     12
     13        * platform/graphics/GraphicsContext.cpp:
     14        (WebCore::GraphicsContext::drawImage):
     15        (WebCore::GraphicsContext::drawImageBuffer):
     16        (WebCore::GraphicsContext::drawConsumingImageBuffer):
     17
    1182016-01-19  Ada Chan  <adachan@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp

    r194966 r195415  
    768768    }
    769769
    770     // FIXME (49002): Should be InterpolationLow
    771     InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
     770    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
    772771    image.draw(*this, destination, source, imagePaintingOptions.m_compositeOperator, imagePaintingOptions.m_blendMode, imagePaintingOptions.m_orientationDescription);
    773772}
     
    823822        return;
    824823
    825     // FIXME (49002): Should be InterpolationLow
    826     InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
     824    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
    827825    image.draw(*this, destination, source, imagePaintingOptions.m_compositeOperator, imagePaintingOptions.m_blendMode, imagePaintingOptions.m_useLowQualityScale);
    828826}
     
    849847        return;
    850848   
    851     // FIXME (49002): Should be InterpolationLow
    852     InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
     849    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
    853850
    854851    ImageBuffer::drawConsuming(WTFMove(image), *this, destination, source, imagePaintingOptions.m_compositeOperator, imagePaintingOptions.m_blendMode, imagePaintingOptions.m_useLowQualityScale);
Note: See TracChangeset for help on using the changeset viewer.