Changeset 205771 in webkit
- Timestamp:
- Sep 9, 2016 2:54:31 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r205768 r205771 1 2016-09-09 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Remove unused member of GlyphBuffer 4 https://bugs.webkit.org/show_bug.cgi?id=161814 5 6 Reviewed by Simon Fraser. 7 8 This m_offsets member never actually affected anything. It just made 9 FontCascade::drawGlyphBuffer() slower. 10 11 No new tests because there is no behavior change. 12 13 * platform/graphics/FontCascade.cpp: 14 (WebCore::FontCascade::drawGlyphBuffer): 15 * platform/graphics/GlyphBuffer.h: 16 (WebCore::GlyphBuffer::clear): 17 (WebCore::GlyphBuffer::advanceAt): 18 (WebCore::GlyphBuffer::add): 19 (WebCore::GlyphBuffer::shrink): 20 (WebCore::GlyphBuffer::swap): 21 (WebCore::GlyphBuffer::offsetAt): Deleted. 22 * platform/graphics/win/UniscribeController.cpp: 23 (WebCore::UniscribeController::shapeAndPlaceItem): 24 1 25 2016-09-09 Tim Horton <timothy_horton@apple.com> 2 26 -
trunk/Source/WebCore/platform/graphics/FontCascade.cpp
r205186 r205771 1285 1285 // Draw each contiguous run of glyphs that use the same font data. 1286 1286 const Font* fontData = glyphBuffer.fontAt(0); 1287 FloatSize offset = glyphBuffer.offsetAt(0);1288 1287 FloatPoint startPoint(point.x(), point.y() - glyphBuffer.initialAdvance().height()); 1289 1288 float nextX = startPoint.x() + glyphBuffer.advanceAt(0).width(); … … 1293 1292 while (nextGlyph < glyphBuffer.size()) { 1294 1293 const Font* nextFontData = glyphBuffer.fontAt(nextGlyph); 1295 FloatSize nextOffset = glyphBuffer.offsetAt(nextGlyph); 1296 1297 if (nextFontData != fontData || nextOffset != offset) { 1294 1295 if (nextFontData != fontData) { 1298 1296 context.drawGlyphs(*this, *fontData, glyphBuffer, lastFrom, nextGlyph - lastFrom, startPoint); 1299 1297 1300 1298 lastFrom = nextGlyph; 1301 1299 fontData = nextFontData; 1302 offset = nextOffset;1303 1300 startPoint.setX(nextX); 1304 1301 startPoint.setY(nextY); -
trunk/Source/WebCore/platform/graphics/GlyphBuffer.h
r205396 r205771 88 88 if (m_offsetsInString) 89 89 m_offsetsInString->clear(); 90 #if PLATFORM(WIN)91 m_offsets.clear();92 #endif93 90 } 94 91 … … 119 116 return m_advances[index]; 120 117 } 121 122 FloatSize offsetAt(unsigned index) const123 {124 #if PLATFORM(WIN)125 return m_offsets[index];126 #else127 UNUSED_PARAM(index);128 return FloatSize();129 #endif130 }131 118 132 119 static const unsigned noOffset = UINT_MAX; 133 void add(Glyph glyph, const Font* font, float width, unsigned offsetInString = noOffset , const FloatSize* offset = 0)120 void add(Glyph glyph, const Font* font, float width, unsigned offsetInString = noOffset) 134 121 { 135 122 m_font.append(font); … … 148 135 #else 149 136 m_advances.append(FloatSize(width, 0)); 150 #endif151 152 #if PLATFORM(WIN)153 if (offset)154 m_offsets.append(*offset);155 else156 m_offsets.append(FloatSize());157 #else158 UNUSED_PARAM(offset);159 137 #endif 160 138 … … 213 191 if (m_offsetsInString) 214 192 m_offsetsInString->shrink(truncationPoint); 215 #if PLATFORM(WIN)216 m_offsets.shrink(truncationPoint);217 #endif218 193 } 219 194 … … 232 207 m_advances[index1] = m_advances[index2]; 233 208 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 #endif240 209 } 241 210 … … 245 214 GlyphBufferAdvance m_initialAdvance; 246 215 std::unique_ptr<Vector<unsigned, 2048>> m_offsetsInString; 247 #if PLATFORM(WIN)248 Vector<FloatSize, 2048> m_offsets;249 #endif250 216 float m_leadingExpansion; 251 217 }; -
trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp
r192895 r205771 366 366 if (glyphBuffer) { 367 367 FloatSize size(offsetX, -offsetY); 368 glyphBuffer->add(glyph, fontData, advance, GlyphBuffer::noOffset , &size);368 glyphBuffer->add(glyph, fontData, advance, GlyphBuffer::noOffset); 369 369 } 370 370
Note: See TracChangeset
for help on using the changeset viewer.