Changeset 50674 in webkit


Ignore:
Timestamp:
Nov 9, 2009 11:50:58 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-09 Shinichiro Hamaji <hamaji@chromium.org>

Reviewed by Dimitri Glazkov.

Win chromium is slow to draw transparent texts
https://bugs.webkit.org/show_bug.cgi?id=31258

Clip graphics context to reduce calculation.

No new tests because this change only affects performance.

  • platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r50673 r50674  
     12009-11-09  Shinichiro Hamaji  <hamaji@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Win chromium is slow to draw transparent texts
     6        https://bugs.webkit.org/show_bug.cgi?id=31258
     7
     8        Clip graphics context to reduce calculation.
     9
     10        No new tests because this change only affects performance.
     11
     12        * platform/graphics/chromium/FontChromiumWin.cpp:
     13        (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
     14        (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
     15
    1162009-11-09  Carol Szabo  <carol.szabo@nokia.com>
    217
  • trunk/WebCore/platform/graphics/chromium/FontChromiumWin.cpp

    r48313 r50674  
    113113void TransparencyAwareFontPainter::initializeForGDI()
    114114{
     115    m_graphicsContext->save();
    115116    SkColor color = m_platformContext->effectiveFillColor();
    116117    if (SkColorGetA(color) != 0xFF) {
     
    132133        layerMode = TransparencyWin::TextComposite;
    133134        layerRect = estimateTextBounds();
     135        m_graphicsContext->clip(layerRect);
    134136
    135137        // The transparency helper requires that we draw text in black in
     
    142144        layerMode = TransparencyWin::OpaqueCompositeLayer;
    143145        layerRect = estimateTextBounds();
     146        m_graphicsContext->clip(layerRect);
    144147    } else {
    145148        // Common case of drawing onto the bottom layer of a web page: we
     
    168171    if (m_createdTransparencyLayer)
    169172        m_graphicsContext->endTransparencyLayer();
     173    m_graphicsContext->restore();
    170174    m_platformContext->canvas()->endPlatformPaint();
    171175}
Note: See TracChangeset for help on using the changeset viewer.