Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: Source/platform/fonts/shaping/HarfBuzzShaper.h

Issue 676523003: Offset-only GlyphBuffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor cleanup Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 int determineWordBreakSpacing(); 122 int determineWordBreakSpacing();
123 // setPadding sets a number of pixels to be distributed across the TextRun. 123 // setPadding sets a number of pixels to be distributed across the TextRun.
124 // WebKit uses this to justify text. 124 // WebKit uses this to justify text.
125 void setPadding(int); 125 void setPadding(int);
126 126
127 void setFontFeatures(); 127 void setFontFeatures();
128 128
129 bool createHarfBuzzRuns(); 129 bool createHarfBuzzRuns();
130 bool shapeHarfBuzzRuns(); 130 bool shapeHarfBuzzRuns();
131 bool fillGlyphBuffer(GlyphBuffer*); 131 bool fillGlyphBuffer(GlyphBuffer*);
132 void fillGlyphBufferFromHarfBuzzRun(GlyphBuffer*, HarfBuzzRun*, float& carry Advance); 132 float fillGlyphBufferFromHarfBuzzRun(GlyphBuffer*, HarfBuzzRun*, float initi alAdvance);
133 void fillGlyphBufferForTextEmphasis(GlyphBuffer*, HarfBuzzRun* currentRun); 133 float fillGlyphBufferForTextEmphasis(GlyphBuffer*, HarfBuzzRun*, float initi alAdvance);
134 void setGlyphPositionsForHarfBuzzRun(HarfBuzzRun*, hb_buffer_t*); 134 void setGlyphPositionsForHarfBuzzRun(HarfBuzzRun*, hb_buffer_t*);
135 void addHarfBuzzRun(unsigned startCharacter, unsigned endCharacter, const Si mpleFontData*, UScriptCode); 135 void addHarfBuzzRun(unsigned startCharacter, unsigned endCharacter, const Si mpleFontData*, UScriptCode);
136 136
137 const Font* m_font; 137 const Font* m_font;
138 OwnPtr<UChar[]> m_normalizedBuffer; 138 OwnPtr<UChar[]> m_normalizedBuffer;
139 unsigned m_normalizedBufferLength; 139 unsigned m_normalizedBufferLength;
140 const TextRun& m_run; 140 const TextRun& m_run;
141 141
142 float m_wordSpacingAdjustment; // Delta adjustment (pixels) for each word br eak. 142 float m_wordSpacingAdjustment; // Delta adjustment (pixels) for each word br eak.
143 float m_padding; // Pixels to be distributed over the line at word breaks. 143 float m_padding; // Pixels to be distributed over the line at word breaks.
(...skipping 12 matching lines...) Expand all
156 float m_totalWidth; 156 float m_totalWidth;
157 FloatBoxExtent m_glyphBoundingBox; 157 FloatBoxExtent m_glyphBoundingBox;
158 HashSet<const SimpleFontData*>* m_fallbackFonts; 158 HashSet<const SimpleFontData*>* m_fallbackFonts;
159 159
160 friend struct CachedShapingResults; 160 friend struct CachedShapingResults;
161 }; 161 };
162 162
163 } // namespace blink 163 } // namespace blink
164 164
165 #endif // HarfBuzzShaper_h 165 #endif // HarfBuzzShaper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698