Changeset 63706 in webkit


Ignore:
Timestamp:
Jul 19, 2010 7:03:54 PM (14 years ago)
Author:
andreas.kling@nokia.com
Message:

2010-07-19 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Don't unnecessarily copy QPainterPath in fillPath() and strokePath()
https://bugs.webkit.org/show_bug.cgi?id=42513

Avoid making unnecessary deep-copies of QPainterPaths that will
be discarded after use.

  • platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63705 r63706  
     12010-07-19  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Don't unnecessarily copy QPainterPath in fillPath() and strokePath()
     6        https://bugs.webkit.org/show_bug.cgi?id=42513
     7
     8        Avoid making unnecessary deep-copies of QPainterPaths that will
     9        be discarded after use.
     10
     11        * platform/graphics/qt/GraphicsContextQt.cpp:
     12        (WebCore::GraphicsContext::fillPath):
     13        (WebCore::GraphicsContext::strokePath):
     14
    1152010-07-19  Kenneth Russell  <kbr@google.com>
    216
  • trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r63654 r63706  
    568568
    569569    QPainter* p = m_data->p();
    570     QPainterPath path = m_data->currentPath;
     570    QPainterPath& path = m_data->currentPath; // Avoid detaching the QPainterPath
    571571    path.setFillRule(toQtFillRule(fillRule()));
    572572
     
    592592    QPainter* p = m_data->p();
    593593    QPen pen(p->pen());
    594     QPainterPath path = m_data->currentPath;
     594    QPainterPath& path = m_data->currentPath; // Avoid detaching the QPainterPath
    595595    path.setFillRule(toQtFillRule(fillRule()));
    596596
Note: See TracChangeset for help on using the changeset viewer.