[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

ariya at webkit.org ariya at webkit.org
Wed Dec 22 18:46:17 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 48b57642d4704fb99d50af0471a76d4ed886eab7
Author: ariya at webkit.org <ariya at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 17 16:43:05 2010 +0000

    2010-12-17  Ariya Hidayat  <ariya at sencha.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] Default image interpolation should reset the render hint
            https://bugs.webkit.org/show_bug.cgi?id=51233
    
            Save initial SmoothPixmapTransform render hint so that it can be used
            with default image interpolation quality to reset back the render hints.
    
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
            (WebCore::GraphicsContext::setImageInterpolationQuality):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74272 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e80abf1..a35458b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-17  Ariya Hidayat  <ariya at sencha.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] Default image interpolation should reset the render hint
+        https://bugs.webkit.org/show_bug.cgi?id=51233
+
+        Save initial SmoothPixmapTransform render hint so that it can be used
+        with default image interpolation quality to reset back the render hints.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
+        (WebCore::GraphicsContext::setImageInterpolationQuality):
+
 2010-12-17  Hans Wennborg  <hans at chromium.org>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 51a8291..b94c934 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -198,6 +198,7 @@ public:
     QBrush solidColor;
 
     InterpolationQuality imageInterpolationQuality;
+    bool initialSmoothPixmapTransformHint;
 
     ContextShadow shadow;
     QStack<ContextShadow> shadowStack;
@@ -228,6 +229,7 @@ GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(QPainter* p, cons
     , layerCount(0)
     , solidColor(initialSolidColor)
     , imageInterpolationQuality(InterpolationDefault)
+    , initialSmoothPixmapTransformHint(false)
     , painter(p)
     , platformContextIsOwned(false)
 {
@@ -237,6 +239,9 @@ GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(QPainter* p, cons
     // Use the default the QPainter was constructed with.
     antiAliasingForRectsAndLines = painter->testRenderHint(QPainter::Antialiasing);
 
+    // Used for default image interpolation quality.
+    initialSmoothPixmapTransformHint = painter->testRenderHint(QPainter::SmoothPixmapTransform);
+
     painter->setRenderHint(QPainter::Antialiasing, true);
 }
 
@@ -1392,13 +1397,16 @@ void GraphicsContext::setImageInterpolationQuality(InterpolationQuality quality)
         m_data->p()->setRenderHint(QPainter::SmoothPixmapTransform, false);
         break;
 
-    case InterpolationDefault:
     case InterpolationMedium:
     case InterpolationHigh:
-    default:
         // use the filter
         m_data->p()->setRenderHint(QPainter::SmoothPixmapTransform, true);
         break;
+
+    case InterpolationDefault:
+    default:
+        m_data->p()->setRenderHint(QPainter::SmoothPixmapTransform, m_data->initialSmoothPixmapTransformHint);
+        break;
     };
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list