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

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

Issue 1173533004: Rename m_run to m_textRun in Shaper (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 protected: 48 protected:
49 Shaper(const Font*, const TextRun&, const GlyphData* emphasisData = nullptr, 49 Shaper(const Font*, const TextRun&, const GlyphData* emphasisData = nullptr,
50 HashSet<const SimpleFontData*>* fallbackFonts = nullptr, FloatRect* = nu llptr); 50 HashSet<const SimpleFontData*>* fallbackFonts = nullptr, FloatRect* = nu llptr);
51 51
52 void trackNonPrimaryFallbackFont(const SimpleFontData*); 52 void trackNonPrimaryFallbackFont(const SimpleFontData*);
53 53
54 bool forTextEmphasis() const { return m_emphasisSubstitutionData; } 54 bool forTextEmphasis() const { return m_emphasisSubstitutionData; }
55 void addEmphasisMark(GlyphBuffer*, float midGlyphOffset) const; 55 void addEmphasisMark(GlyphBuffer*, float midGlyphOffset) const;
56 56
57 const Font* m_font; 57 const Font* m_font;
58 const TextRun& m_run; 58 const TextRun& m_textRun;
59 HashSet<const SimpleFontData*>* m_fallbackFonts; 59 HashSet<const SimpleFontData*>* m_fallbackFonts;
60 FloatRect* m_glyphBoundingBox; 60 FloatRect* m_glyphBoundingBox;
61 61
62 float m_expansion; // Pixels to be distributed over the line at word breaks. 62 float m_expansion; // Pixels to be distributed over the line at word breaks.
63 float m_expansionPerOpportunity; // Pixels to be added to each expansion opp ortunity. 63 float m_expansionPerOpportunity; // Pixels to be added to each expansion opp ortunity.
64 bool m_isAfterExpansion; 64 bool m_isAfterExpansion;
65 65
66 private: 66 private:
67 // Emphasis substitution info. If specified, this will be used to replace al l glyphs which 67 // Emphasis substitution info. If specified, this will be used to replace al l glyphs which
68 // can receive text emphasis with center-aligned emphasis glyphs. 68 // can receive text emphasis with center-aligned emphasis glyphs.
69 const GlyphData* m_emphasisSubstitutionData; 69 const GlyphData* m_emphasisSubstitutionData;
70 FloatPoint m_emphasisGlyphCenter; 70 FloatPoint m_emphasisGlyphCenter;
71 }; 71 };
72 72
73 inline void Shaper::trackNonPrimaryFallbackFont(const SimpleFontData* fontData) 73 inline void Shaper::trackNonPrimaryFallbackFont(const SimpleFontData* fontData)
74 { 74 {
75 ASSERT(m_fallbackFonts); 75 ASSERT(m_fallbackFonts);
76 76
77 if (fontData == m_font->primaryFont()) 77 if (fontData == m_font->primaryFont())
78 return; 78 return;
79 79
80 m_fallbackFonts->add(fontData); 80 m_fallbackFonts->add(fontData);
81 } 81 }
82 82
83 } // namespace blink 83 } // namespace blink
84 84
85 #endif // Shaper_h 85 #endif // Shaper_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | Source/platform/fonts/shaping/Shaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698