Changeset 74272 in webkit


Ignore:
Timestamp:
Dec 17, 2010 8:43:05 AM (13 years ago)
Author:
ariya@webkit.org
Message:

2010-12-17 Ariya Hidayat <ariya@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):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r74266 r74272  
     12010-12-17  Ariya Hidayat  <ariya@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Default image interpolation should reset the render hint
     6        https://bugs.webkit.org/show_bug.cgi?id=51233
     7
     8        Save initial SmoothPixmapTransform render hint so that it can be used
     9        with default image interpolation quality to reset back the render hints.
     10
     11        * platform/graphics/qt/GraphicsContextQt.cpp:
     12        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
     13        (WebCore::GraphicsContext::setImageInterpolationQuality):
     14
    1152010-12-17  Hans Wennborg  <hans@chromium.org>
    216
  • trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r74248 r74272  
    199199
    200200    InterpolationQuality imageInterpolationQuality;
     201    bool initialSmoothPixmapTransformHint;
    201202
    202203    ContextShadow shadow;
     
    229230    , solidColor(initialSolidColor)
    230231    , imageInterpolationQuality(InterpolationDefault)
     232    , initialSmoothPixmapTransformHint(false)
    231233    , painter(p)
    232234    , platformContextIsOwned(false)
     
    237239    // Use the default the QPainter was constructed with.
    238240    antiAliasingForRectsAndLines = painter->testRenderHint(QPainter::Antialiasing);
     241
     242    // Used for default image interpolation quality.
     243    initialSmoothPixmapTransformHint = painter->testRenderHint(QPainter::SmoothPixmapTransform);
    239244
    240245    painter->setRenderHint(QPainter::Antialiasing, true);
     
    13931398        break;
    13941399
    1395     case InterpolationDefault:
    13961400    case InterpolationMedium:
    13971401    case InterpolationHigh:
    1398     default:
    13991402        // use the filter
    14001403        m_data->p()->setRenderHint(QPainter::SmoothPixmapTransform, true);
    14011404        break;
     1405
     1406    case InterpolationDefault:
     1407    default:
     1408        m_data->p()->setRenderHint(QPainter::SmoothPixmapTransform, m_data->initialSmoothPixmapTransformHint);
     1409        break;
    14021410    };
    14031411}
Note: See TracChangeset for help on using the changeset viewer.