Title: [195415] trunk/Source/WebCore
Revision
195415
Author
simon.fra...@apple.com
Date
2016-01-21 11:00:33 -0800 (Thu, 21 Jan 2016)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (195414 => 195415)


--- trunk/Source/WebCore/ChangeLog	2016-01-21 18:58:11 UTC (rev 195414)
+++ trunk/Source/WebCore/ChangeLog	2016-01-21 19:00:33 UTC (rev 195415)
@@ -1,3 +1,20 @@
+2016-01-21  Simon Fraser  <simon.fra...@apple.com>
+
+        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):
+
 2016-01-19  Ada Chan  <adac...@apple.com>
 
         Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms.

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (195414 => 195415)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2016-01-21 18:58:11 UTC (rev 195414)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2016-01-21 19:00:33 UTC (rev 195415)
@@ -767,8 +767,7 @@
         return;
     }
 
-    // FIXME (49002): Should be InterpolationLow
-    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
+    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
     image.draw(*this, destination, source, imagePaintingOptions.m_compositeOperator, imagePaintingOptions.m_blendMode, imagePaintingOptions.m_orientationDescription);
 }
 
@@ -822,8 +821,7 @@
     if (paintingDisabled())
         return;
 
-    // FIXME (49002): Should be InterpolationLow
-    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
+    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
     image.draw(*this, destination, source, imagePaintingOptions.m_compositeOperator, imagePaintingOptions.m_blendMode, imagePaintingOptions.m_useLowQualityScale);
 }
 
@@ -848,8 +846,7 @@
     if (paintingDisabled() || !image)
         return;
     
-    // FIXME (49002): Should be InterpolationLow
-    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
+    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
 
     ImageBuffer::drawConsuming(WTFMove(image), *this, destination, source, imagePaintingOptions.m_compositeOperator, imagePaintingOptions.m_blendMode, imagePaintingOptions.m_useLowQualityScale);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to