Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2008 Holger Hans Peter Freyther | 6 * Copyright (C) 2008 Holger Hans Peter Freyther |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 | 131 |
| 132 std::pair<GlyphData, GlyphPage*> glyphDataAndPageForCharacter(UChar32&, bool mirror, bool normalizeSpace = false, FontDataVariant = AutoVariant) const; | 132 std::pair<GlyphData, GlyphPage*> glyphDataAndPageForCharacter(UChar32&, bool mirror, bool normalizeSpace = false, FontDataVariant = AutoVariant) const; |
| 133 bool primaryFontHasGlyphForCharacter(UChar32) const; | 133 bool primaryFontHasGlyphForCharacter(UChar32) const; |
| 134 | 134 |
| 135 CodePath codePath(const TextRunPaintInfo&) const; | 135 CodePath codePath(const TextRunPaintInfo&) const; |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; | 138 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; |
| 139 | 139 |
| 140 // Returns the total advance. | 140 // Returns the total advance. |
| 141 float buildGlyphBuffer(const TextRunPaintInfo&, GlyphBuffer&, ForTextEmphasi sOrNot = NotForTextEmphasis) const; | 141 float buildGlyphBuffer(const TextRunPaintInfo&, GlyphBuffer&, const GlyphDat a* = nullptr) const; |
|
jbroman
2015/03/07 18:50:25
Please include a name for this argument; it's not
f(malita)
2015/03/09 15:04:55
Done.
| |
| 142 PassTextBlobPtr buildTextBlob(const GlyphBuffer&) const; | 142 PassTextBlobPtr buildTextBlob(const GlyphBuffer&) const; |
| 143 SkPaint textFillPaint(GraphicsContext*, const SimpleFontData*) const; | 143 SkPaint textFillPaint(GraphicsContext*, const SimpleFontData*) const; |
| 144 SkPaint textStrokePaint(GraphicsContext*, const SimpleFontData*, bool isFill ing) const; | 144 SkPaint textStrokePaint(GraphicsContext*, const SimpleFontData*, bool isFill ing) const; |
| 145 void paintGlyphs(GraphicsContext*, const SimpleFontData*, const Glyph glyphs [], unsigned numGlyphs, | 145 void paintGlyphs(GraphicsContext*, const SimpleFontData*, const Glyph glyphs [], unsigned numGlyphs, |
| 146 const SkPoint pos[], const FloatRect& textRect) const; | 146 const SkPoint pos[], const FloatRect& textRect) const; |
| 147 void paintGlyphsHorizontal(GraphicsContext*, const SimpleFontData*, const Gl yph glyphs[], unsigned numGlyphs, | 147 void paintGlyphsHorizontal(GraphicsContext*, const SimpleFontData*, const Gl yph glyphs[], unsigned numGlyphs, |
| 148 const SkScalar xpos[], SkScalar constY, const FloatRect& textRect) const ; | 148 const SkScalar xpos[], SkScalar constY, const FloatRect& textRect) const ; |
| 149 void paintGlyphsVertical(GraphicsContext*, const SimpleFontData*, const Glyp hBuffer&, | 149 void paintGlyphsVertical(GraphicsContext*, const SimpleFontData*, const Glyp hBuffer&, |
| 150 unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect&) const; | 150 unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect&) const; |
| 151 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect ) const; | 151 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect ) const; |
| 152 void drawTextBlob(GraphicsContext*, const SkTextBlob*, const SkPoint& origin ) const; | 152 void drawTextBlob(GraphicsContext*, const SkTextBlob*, const SkPoint& origin ) const; |
| 153 void drawGlyphBuffer(GraphicsContext*, const TextRunPaintInfo&, const GlyphB uffer&, const FloatPoint&) const; | 153 void drawGlyphBuffer(GraphicsContext*, const TextRunPaintInfo&, const GlyphB uffer&, const FloatPoint&) const; |
| 154 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Glyp hBuffer&, const AtomicString&, const FloatPoint&) const; | |
| 155 float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*> * fallbackFonts = 0, IntRectOutsets* glyphBounds = 0) const; | 154 float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*> * fallbackFonts = 0, IntRectOutsets* glyphBounds = 0) const; |
| 156 int offsetForPositionForSimpleText(const TextRun&, float position, bool incl udePartialGlyphs) const; | 155 int offsetForPositionForSimpleText(const TextRun&, float position, bool incl udePartialGlyphs) const; |
| 157 FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int h, int from, int to, bool accountForGlyphBounds) const; | 156 FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int h, int from, int to, bool accountForGlyphBounds) const; |
| 158 | 157 |
| 159 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const; | 158 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const; |
| 160 | 159 |
| 161 float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData* >* fallbackFonts, IntRectOutsets* glyphBounds) const; | 160 float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData* >* fallbackFonts, IntRectOutsets* glyphBounds) const; |
| 162 int offsetForPositionForComplexText(const TextRun&, float position, bool inc ludePartialGlyphs) const; | 161 int offsetForPositionForComplexText(const TextRun&, float position, bool inc ludePartialGlyphs) const; |
| 163 FloatRect selectionRectForComplexText(const TextRun&, const FloatPoint&, int h, int from, int to) const; | 162 FloatRect selectionRectForComplexText(const TextRun&, const FloatPoint&, int h, int from, int to) const; |
| 164 | 163 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 224 // to the next tab stop is less than that, advance an additional tab stop. | 223 // to the next tab stop is less than that, advance an additional tab stop. |
| 225 if (distanceToTabStop < fontDescription().letterSpacing()) | 224 if (distanceToTabStop < fontDescription().letterSpacing()) |
| 226 distanceToTabStop += baseTabWidth; | 225 distanceToTabStop += baseTabWidth; |
| 227 | 226 |
| 228 return distanceToTabStop; | 227 return distanceToTabStop; |
| 229 } | 228 } |
| 230 | 229 |
| 231 } // namespace blink | 230 } // namespace blink |
| 232 | 231 |
| 233 #endif | 232 #endif |
| OLD | NEW |