Changeset 205775 in webkit


Ignore:
Timestamp:
Sep 9, 2016 5:06:06 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r205771.
https://bugs.webkit.org/show_bug.cgi?id=161823

Broke Windows build (Requested by litherum on #webkit).

Reverted changeset:

"Remove unused member of GlyphBuffer"
https://bugs.webkit.org/show_bug.cgi?id=161814
http://trac.webkit.org/changeset/205771

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r205774 r205775  
     12016-09-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r205771.
     4        https://bugs.webkit.org/show_bug.cgi?id=161823
     5
     6        Broke Windows build (Requested by litherum on #webkit).
     7
     8        Reverted changeset:
     9
     10        "Remove unused member of GlyphBuffer"
     11        https://bugs.webkit.org/show_bug.cgi?id=161814
     12        http://trac.webkit.org/changeset/205771
     13
    1142016-09-09  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WebCore/platform/graphics/FontCascade.cpp

    r205771 r205775  
    12851285    // Draw each contiguous run of glyphs that use the same font data.
    12861286    const Font* fontData = glyphBuffer.fontAt(0);
     1287    FloatSize offset = glyphBuffer.offsetAt(0);
    12871288    FloatPoint startPoint(point.x(), point.y() - glyphBuffer.initialAdvance().height());
    12881289    float nextX = startPoint.x() + glyphBuffer.advanceAt(0).width();
     
    12921293    while (nextGlyph < glyphBuffer.size()) {
    12931294        const Font* nextFontData = glyphBuffer.fontAt(nextGlyph);
    1294 
    1295         if (nextFontData != fontData) {
     1295        FloatSize nextOffset = glyphBuffer.offsetAt(nextGlyph);
     1296
     1297        if (nextFontData != fontData || nextOffset != offset) {
    12961298            context.drawGlyphs(*this, *fontData, glyphBuffer, lastFrom, nextGlyph - lastFrom, startPoint);
    12971299
    12981300            lastFrom = nextGlyph;
    12991301            fontData = nextFontData;
     1302            offset = nextOffset;
    13001303            startPoint.setX(nextX);
    13011304            startPoint.setY(nextY);
  • trunk/Source/WebCore/platform/graphics/GlyphBuffer.h

    r205771 r205775  
    8888        if (m_offsetsInString)
    8989            m_offsetsInString->clear();
     90#if PLATFORM(WIN)
     91        m_offsets.clear();
     92#endif
    9093    }
    9194
     
    116119        return m_advances[index];
    117120    }
     121
     122    FloatSize offsetAt(unsigned index) const
     123    {
     124#if PLATFORM(WIN)
     125        return m_offsets[index];
     126#else
     127        UNUSED_PARAM(index);
     128        return FloatSize();
     129#endif
     130    }
    118131   
    119132    static const unsigned noOffset = UINT_MAX;
    120     void add(Glyph glyph, const Font* font, float width, unsigned offsetInString = noOffset)
     133    void add(Glyph glyph, const Font* font, float width, unsigned offsetInString = noOffset, const FloatSize* offset = 0)
    121134    {
    122135        m_font.append(font);
     
    135148#else
    136149        m_advances.append(FloatSize(width, 0));
     150#endif
     151
     152#if PLATFORM(WIN)
     153        if (offset)
     154            m_offsets.append(*offset);
     155        else
     156            m_offsets.append(FloatSize());
     157#else
     158        UNUSED_PARAM(offset);
    137159#endif
    138160       
     
    191213        if (m_offsetsInString)
    192214            m_offsetsInString->shrink(truncationPoint);
     215#if PLATFORM(WIN)
     216        m_offsets.shrink(truncationPoint);
     217#endif
    193218    }
    194219
     
    207232        m_advances[index1] = m_advances[index2];
    208233        m_advances[index2] = s;
     234
     235#if PLATFORM(WIN)
     236        FloatSize offset = m_offsets[index1];
     237        m_offsets[index1] = m_offsets[index2];
     238        m_offsets[index2] = offset;
     239#endif
    209240    }
    210241
     
    214245    GlyphBufferAdvance m_initialAdvance;
    215246    std::unique_ptr<Vector<unsigned, 2048>> m_offsetsInString;
     247#if PLATFORM(WIN)
     248    Vector<FloatSize, 2048> m_offsets;
     249#endif
    216250    float m_leadingExpansion;
    217251};
  • trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp

    r205771 r205775  
    366366        if (glyphBuffer) {
    367367            FloatSize size(offsetX, -offsetY);
    368             glyphBuffer->add(glyph, fontData, advance, GlyphBuffer::noOffset);
     368            glyphBuffer->add(glyph, fontData, advance, GlyphBuffer::noOffset, &size);
    369369        }
    370370
Note: See TracChangeset for help on using the changeset viewer.