Changeset 109347 in webkit


Ignore:
Timestamp:
Mar 1, 2012 8:13:19 AM (12 years ago)
Author:
Simon Hausmann
Message:

[Qt] Fixed incorrect size pixmap creation for a new transparency layer.
https://bugs.webkit.org/show_bug.cgi?id=79658

If QPainter does not have clipping, beginPlatformTransparencyLayer can create
wrong size pixmap, so it causes incorrect rendering.

Patch by Huang Dongsung <luxtella@company100.net> on 2012-03-01
Reviewed by Simon Hausmann.

  • platform/graphics/qt/GraphicsContextQt.cpp:

(WebCore::GraphicsContext::beginPlatformTransparencyLayer):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109346 r109347  
     12012-03-01  Huang Dongsung  <luxtella@company100.net>
     2
     3        [Qt] Fixed incorrect size pixmap creation for a new transparency layer.
     4        https://bugs.webkit.org/show_bug.cgi?id=79658
     5
     6        If QPainter does not have clipping, beginPlatformTransparencyLayer can create
     7        wrong size pixmap, so it causes incorrect rendering.
     8
     9        Reviewed by Simon Hausmann.
     10
     11        * platform/graphics/qt/GraphicsContextQt.cpp:
     12        (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
     13
    1142012-03-01  Simon Hausmann  <simon.hausmann@nokia.com>
    215
  • trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r108466 r109347  
    10691069    h = device->height();
    10701070
    1071     QRectF clip = m_data->clipBoundingRect();
    1072     QRectF deviceClip = p->transform().mapRect(clip);
    1073     x = int(qBound(qreal(0), deviceClip.x(), (qreal)w));
    1074     y = int(qBound(qreal(0), deviceClip.y(), (qreal)h));
    1075     w = int(qBound(qreal(0), deviceClip.width(), (qreal)w) + 2);
    1076     h = int(qBound(qreal(0), deviceClip.height(), (qreal)h) + 2);
     1071    if (p->hasClipping()) {
     1072        QRectF clip = m_data->clipBoundingRect();
     1073        QRectF deviceClip = p->transform().mapRect(clip);
     1074        x = int(qBound(qreal(0), deviceClip.x(), (qreal)w));
     1075        y = int(qBound(qreal(0), deviceClip.y(), (qreal)h));
     1076        w = int(qBound(qreal(0), deviceClip.width(), (qreal)w) + 2);
     1077        h = int(qBound(qreal(0), deviceClip.height(), (qreal)h) + 2);
     1078    }
    10771079
    10781080    QPixmap emptyAlphaMask;
Note: See TracChangeset for help on using the changeset viewer.