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

Side by Side Diff: Source/platform/fonts/Font.h

Issue 692643006: Restore webkit-font-smoothing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Actually suppress flaky tests. 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 initial in-stream advance. 140 // Returns the initial in-stream advance.
141 float buildGlyphBuffer(const TextRunPaintInfo&, GlyphBuffer&, ForTextEmphasi sOrNot = NotForTextEmphasis) const; 141 float buildGlyphBuffer(const TextRunPaintInfo&, GlyphBuffer&, ForTextEmphasi sOrNot = NotForTextEmphasis) const;
142 PassTextBlobPtr buildTextBlob(const GlyphBuffer&, float initialAdvance, cons t FloatRect& bounds, 142 PassTextBlobPtr buildTextBlob(const GlyphBuffer&, float initialAdvance, cons t FloatRect& bounds,
143 bool couldUseLCD) const; 143 bool couldUseLCD) const;
144
145 SkPaint textFillPaint(GraphicsContext*, const SimpleFontData*) const;
146 SkPaint textStrokePaint(GraphicsContext*, const SimpleFontData*, bool isFill ing) const;
147 void paintGlyphs(GraphicsContext*, const SimpleFontData*, const Glyph glyphs [], unsigned numGlyphs,
148 const SkPoint pos[], const FloatRect& textRect) const;
149 void paintGlyphsHorizontal(GraphicsContext*, const SimpleFontData*, const Gl yph glyphs[], unsigned numGlyphs,
150 const SkScalar xpos[], SkScalar constY, const FloatRect& textRect) const ;
144 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;
145 void drawTextBlob(GraphicsContext*, const SkTextBlob*, const SkPoint& origin ) const; 152 void drawTextBlob(GraphicsContext*, const SkTextBlob*, const SkPoint& origin ) const;
146 float drawGlyphBuffer(GraphicsContext*, const TextRunPaintInfo&, const Glyph Buffer&, const FloatPoint&) const; 153 float drawGlyphBuffer(GraphicsContext*, const TextRunPaintInfo&, const Glyph Buffer&, const FloatPoint&) const;
147 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Glyp hBuffer&, const AtomicString&, const FloatPoint&) const; 154 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Glyp hBuffer&, const AtomicString&, const FloatPoint&) const;
148 float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*> * fallbackFonts = 0, IntRectExtent* glyphBounds = 0) const; 155 float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*> * fallbackFonts = 0, IntRectExtent* glyphBounds = 0) const;
149 int offsetForPositionForSimpleText(const TextRun&, float position, bool incl udePartialGlyphs) const; 156 int offsetForPositionForSimpleText(const TextRun&, float position, bool incl udePartialGlyphs) const;
150 FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int h, int from, int to, bool accountForGlyphBounds) const; 157 FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int h, int from, int to, bool accountForGlyphBounds) const;
151 158
152 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const; 159 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const;
153 160
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 { 217 {
211 if (!tabSize) 218 if (!tabSize)
212 return fontDescription().letterSpacing(); 219 return fontDescription().letterSpacing();
213 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS pacing(); 220 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS pacing();
214 return tabWidth - fmodf(position, tabWidth); 221 return tabWidth - fmodf(position, tabWidth);
215 } 222 }
216 223
217 } // namespace blink 224 } // namespace blink
218 225
219 #endif 226 #endif
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698