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

Unified Diff: sky/engine/platform/fonts/harfbuzz/HarfBuzzShaper.h

Issue 859203002: Merge Blink code to cache SkTextBlob (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: hashmap Created 5 years, 11 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
Index: sky/engine/platform/fonts/harfbuzz/HarfBuzzShaper.h
diff --git a/sky/engine/platform/fonts/harfbuzz/HarfBuzzShaper.h b/sky/engine/platform/fonts/harfbuzz/HarfBuzzShaper.h
index 8e968a6930a5cff78f0d4d9146e2fab5fac87793..581737ce1f4bf82d5e7057ca238e6916589827dd 100644
--- a/sky/engine/platform/fonts/harfbuzz/HarfBuzzShaper.h
+++ b/sky/engine/platform/fonts/harfbuzz/HarfBuzzShaper.h
@@ -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(GlyphBuffer*, HarfBuzzRun*, float& carryAdvance);
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 | « sky/engine/platform/fonts/harfbuzz/FontHarfBuzz.cpp ('k') | sky/engine/platform/fonts/harfbuzz/HarfBuzzShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698