Changeset 90020 in webkit


Ignore:
Timestamp:
Jun 29, 2011 8:56:52 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-29 Igor Oliveira <igor.oliveira@openbossa.org>

Reviewed by Andreas Kling.

[Qt] GraphicsContext::clipToImageBuffer does not support scale transformation
https://bugs.webkit.org/show_bug.cgi?id=63555

Scale alphaMask if GraphicsContext is scaled

  • platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::pushTransparencyLayerInternal):
  • platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::clip):
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90017 r90020  
     12011-06-29  Igor Oliveira  <igor.oliveira@openbossa.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] GraphicsContext::clipToImageBuffer does not support scale transformation
     6        https://bugs.webkit.org/show_bug.cgi?id=63555
     7
     8        Scale alphaMask if GraphicsContext is scaled
     9
     10        * platform/graphics/qt/GraphicsContextQt.cpp:
     11        (WebCore::GraphicsContext::pushTransparencyLayerInternal):
     12        * platform/graphics/qt/ImageBufferQt.cpp:
     13        (WebCore::ImageBuffer::clip):
     14
    1152011-06-29  Andrey Kosyakov  <caseq@chromium.org>
    216
  • trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r88144 r90020  
    951951{
    952952    QPainter* p = m_data->p();
    953     m_data->layers.push(new TransparencyLayer(p, p->transform().mapRect(rect), 1.0, alphaMask));
     953
     954    QRect deviceClip = p->transform().mapRect(rect);
     955    if (alphaMask.width() != deviceClip.width() || alphaMask.height() != deviceClip.height())
     956        alphaMask = alphaMask.scaled(deviceClip.width(), deviceClip.height());
     957
     958    m_data->layers.push(new TransparencyLayer(p, deviceClip, 1.0, alphaMask));
    954959}
    955960
  • trunk/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp

    r87640 r90020  
    162162    IntRect rect = enclosingIntRect(floatRect);
    163163    QPixmap alphaMask = *nativeImage;
    164     if (alphaMask.width() != rect.width() || alphaMask.height() != rect.height())
    165         alphaMask = alphaMask.scaled(rect.width(), rect.height());
    166164
    167165    context->pushTransparencyLayerInternal(rect, 1.0, alphaMask);
Note: See TracChangeset for help on using the changeset viewer.