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

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

Issue 986493002: Simplify text emphasis painting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/fonts/Font.cpp ('k') | Source/platform/fonts/shaping/HarfBuzzShaper.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include <unicode/uscript.h> 45 #include <unicode/uscript.h>
46 46
47 namespace blink { 47 namespace blink {
48 48
49 class Font; 49 class Font;
50 class GlyphBuffer; 50 class GlyphBuffer;
51 class SimpleFontData; 51 class SimpleFontData;
52 52
53 class HarfBuzzShaper final : public Shaper { 53 class HarfBuzzShaper final : public Shaper {
54 public: 54 public:
55 HarfBuzzShaper(const Font*, const TextRun&, ForTextEmphasisOrNot = NotForTex tEmphasis, HashSet<const SimpleFontData*>* fallbackFonts = 0, FloatRect* = 0); 55 HarfBuzzShaper(const Font*, const TextRun&, const GlyphData* emphasisData = nullptr,
56 HashSet<const SimpleFontData*>* fallbackFonts = nullptr, FloatRect* = nu llptr);
56 57
57 void setDrawRange(int from, int to); 58 void setDrawRange(int from, int to);
58 bool shape(GlyphBuffer* = 0); 59 bool shape(GlyphBuffer* = 0);
59 float totalWidth() { return m_totalWidth; } 60 float totalWidth() { return m_totalWidth; }
60 int offsetForPosition(float targetX); 61 int offsetForPosition(float targetX);
61 FloatRect selectionRect(const FloatPoint&, int height, int from, int to); 62 FloatRect selectionRect(const FloatPoint&, int height, int from, int to);
62 63
63 private: 64 private:
64 class HarfBuzzRun { 65 class HarfBuzzRun {
65 public: 66 public:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 int m_toIndex; 145 int m_toIndex;
145 146
146 float m_totalWidth; 147 float m_totalWidth;
147 148
148 friend struct CachedShapingResults; 149 friend struct CachedShapingResults;
149 }; 150 };
150 151
151 } // namespace blink 152 } // namespace blink
152 153
153 #endif // HarfBuzzShaper_h 154 #endif // HarfBuzzShaper_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/Font.cpp ('k') | Source/platform/fonts/shaping/HarfBuzzShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698