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

Unified Diff: Source/platform/fonts/harfbuzz/HarfBuzzShaper.h

Issue 607483002: Separate advance from offset in GlypBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase w/HEAD Created 6 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp ('k') | Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/harfbuzz/HarfBuzzShaper.h
diff --git a/Source/platform/fonts/harfbuzz/HarfBuzzShaper.h b/Source/platform/fonts/harfbuzz/HarfBuzzShaper.h
index 98ea37cb104d330e8764d0c4041e8dd8c797db99..3672df01dd2a65b9b32917a23ee317027b67c969 100644
--- a/Source/platform/fonts/harfbuzz/HarfBuzzShaper.h
+++ b/Source/platform/fonts/harfbuzz/HarfBuzzShaper.h
@@ -46,7 +46,7 @@
namespace blink {
class Font;
-class GlyphBuffer;
+class GlyphBufferWithOffsets;
class SimpleFontData;
class HarfBuzzShaper FINAL {
@@ -60,7 +60,6 @@ public:
void setDrawRange(int from, int to);
bool shape(GlyphBuffer* = 0);
- FloatPoint adjustStartPoint(const FloatPoint&);
float totalWidth() { return m_totalWidth; }
int offsetForPosition(float targetX);
FloatRect selectionRect(const FloatPoint&, int height, int from, int to);
@@ -90,7 +89,7 @@ private:
unsigned numGlyphs() const { return m_numGlyphs; }
uint16_t* glyphs() { return &m_glyphs[0]; }
float* advances() { return &m_advances[0]; }
- FloatPoint* offsets() { return &m_offsets[0]; }
+ FloatSize* offsets() { return &m_offsets[0]; }
bool hasGlyphToCharacterIndexes() const
{
return m_glyphToCharacterIndexes.size() > 0;
@@ -116,7 +115,7 @@ private:
Vector<uint16_t, 256> m_glyphs;
Vector<float, 256> m_advances;
Vector<uint16_t, 256> m_glyphToCharacterIndexes;
- Vector<FloatPoint, 256> m_offsets;
+ Vector<FloatSize, 256> m_offsets;
float m_width;
};
@@ -130,7 +129,7 @@ private:
bool createHarfBuzzRuns();
bool shapeHarfBuzzRuns();
bool fillGlyphBuffer(GlyphBuffer*);
- void fillGlyphBufferFromHarfBuzzRun(GlyphBuffer*, HarfBuzzRun*, FloatPoint& firstOffsetOfNextRun);
+ void fillGlyphBufferFromHarfBuzzRun(GlyphBufferWithOffsets*, HarfBuzzRun*);
void fillGlyphBufferForTextEmphasis(GlyphBuffer*, HarfBuzzRun* currentRun);
void setGlyphPositionsForHarfBuzzRun(HarfBuzzRun*, hb_buffer_t*);
void addHarfBuzzRun(unsigned startCharacter, unsigned endCharacter, const SimpleFontData*, UScriptCode);
@@ -149,8 +148,6 @@ private:
Vector<hb_feature_t, 4> m_features;
Vector<OwnPtr<HarfBuzzRun>, 16> m_harfBuzzRuns;
- FloatPoint m_startOffset;
-
int m_fromIndex;
int m_toIndex;
« no previous file with comments | « Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp ('k') | Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698