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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.h

Issue 2715773002: Add ShapeResult::RunInfo glyph iterators (Closed)
Patch Set: fillGlyphBufferForResult Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ShapeResultBuffer_h 5 #ifndef ShapeResultBuffer_h
6 #define ShapeResultBuffer_h 6 #define ShapeResultBuffer_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/fonts/shaping/ShapeResult.h" 9 #include "platform/fonts/shaping/ShapeResult.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 private: 60 private:
61 static CharacterRange getCharacterRangeInternal( 61 static CharacterRange getCharacterRangeInternal(
62 const Vector<RefPtr<const ShapeResult>, 64>&, 62 const Vector<RefPtr<const ShapeResult>, 64>&,
63 TextDirection, 63 TextDirection,
64 float totalWidth, 64 float totalWidth,
65 unsigned from, 65 unsigned from,
66 unsigned to); 66 unsigned to);
67 67
68 float fillFastHorizontalGlyphBuffer(GlyphBuffer*, const TextRun&) const; 68 float fillFastHorizontalGlyphBuffer(GlyphBuffer*, const TextRun&) const;
69 69
70 template <TextDirection> 70 static float fillGlyphBufferForResult(GlyphBuffer*,
71 static float fillGlyphBufferForRun(GlyphBuffer*, 71 const ShapeResult&,
72 const ShapeResult::RunInfo*, 72 const TextRun&,
73 const TextRun&, 73 float initialAdvance,
74 float initialAdvance, 74 unsigned from,
75 unsigned from, 75 unsigned to,
76 unsigned to, 76 unsigned runOffset);
77 unsigned runOffset);
78 static float fillGlyphBufferForTextEmphasisRun(GlyphBuffer*, 77 static float fillGlyphBufferForTextEmphasisRun(GlyphBuffer*,
79 const ShapeResult::RunInfo*, 78 const ShapeResult::RunInfo*,
80 const TextRun&, 79 const TextRun&,
81 const GlyphData*, 80 const GlyphData*,
82 float initialAdvance, 81 float initialAdvance,
83 unsigned from, 82 unsigned from,
84 unsigned to, 83 unsigned to,
85 unsigned runOffset); 84 unsigned runOffset);
86 85
87 static void addRunInfoRanges(const ShapeResult::RunInfo&, 86 static void addRunInfoRanges(const ShapeResult::RunInfo&,
88 float offset, 87 float offset,
89 Vector<CharacterRange>&); 88 Vector<CharacterRange>&);
90 89
91 // Empirically, cases where we get more than 50 ShapeResults are extremely 90 // Empirically, cases where we get more than 50 ShapeResults are extremely
92 // rare. 91 // rare.
93 Vector<RefPtr<const ShapeResult>, 64> m_results; 92 Vector<RefPtr<const ShapeResult>, 64> m_results;
94 bool m_hasVerticalOffsets; 93 bool m_hasVerticalOffsets;
95 }; 94 };
96 95
97 } // namespace blink 96 } // namespace blink
98 97
99 #endif // ShapeResultBuffer_h 98 #endif // ShapeResultBuffer_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698