Changeset 46939 in webkit
- Timestamp:
- Aug 7, 2009 6:25:07 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r46938 r46939 1 2009-08-07 Yong Li <yong.li@torchmobile.com> 2 3 WINCE PORT: store only width for GlyphBufferAdvance, to save space on low-memory devices 4 https://bugs.webkit.org/show_bug.cgi?id=27734 5 6 * platform/graphics/GlyphBuffer.h: 7 (WebCore::GlyphBuffer::advanceAt): 8 (WebCore::GlyphBuffer::advanceData): 9 (WebCore::GlyphBuffer::add): 10 1 11 2009-08-07 Yong Li <yong.li@torchmobile.com> 2 12 -
trunk/WebCore/platform/graphics/GlyphBuffer.h
r40965 r46939 1 1 /* 2 2 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2007-2008 Torch Mobile Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 50 51 // FIXME: Why does Cairo use such a huge struct instead of just an offset into an array? 51 52 typedef cairo_glyph_t GlyphBufferGlyph; 53 #elif PLATFORM(WINCE) 54 typedef wchar_t GlyphBufferGlyph; 52 55 #else 53 56 typedef Glyph GlyphBufferGlyph; … … 58 61 #if PLATFORM(CG) 59 62 typedef CGSize GlyphBufferAdvance; 63 #elif PLATFORM(WINCE) 64 // There is no cross-platform code that uses the height of GlyphBufferAdvance, 65 // so we can save memory space on embedded devices by storing only the width 66 typedef float GlyphBufferAdvance; 60 67 #else 61 68 typedef FloatSize GlyphBufferAdvance; … … 118 125 #if PLATFORM(CG) 119 126 return m_advances[index].width; 127 #elif PLATFORM(WINCE) 128 return m_advances[index]; 120 129 #else 121 130 return m_advances[index].width(); 122 131 #endif 123 132 } 133 134 #if PLATFORM(WINCE) 135 const GlyphBufferAdvance* advanceData() const 136 { 137 return m_advances.data(); 138 } 139 #endif 124 140 125 141 FloatSize offsetAt(int index) const … … 148 164 CGSize advance = { width, 0 }; 149 165 m_advances.append(advance); 166 #elif PLATFORM(WINCE) 167 m_advances.append(width); 150 168 #else 151 169 m_advances.append(FloatSize(width, 0)); … … 162 180 } 163 181 182 #if !PLATFORM(WINCE) 164 183 void add(Glyph glyph, const SimpleFontData* font, GlyphBufferAdvance advance) 165 184 { … … 175 194 m_advances.append(advance); 176 195 } 196 #endif 177 197 178 198 private:
Note: See TracChangeset
for help on using the changeset viewer.