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

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

Issue 2702853002: [LayoutNG] Shape items with context (Closed)
Patch Set: Add null check 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 int offsetForPosition(const TextRun&, 44 int offsetForPosition(const TextRun&,
45 float targetX, 45 float targetX,
46 bool includePartialGlyphs) const; 46 bool includePartialGlyphs) const;
47 CharacterRange getCharacterRange(TextDirection, 47 CharacterRange getCharacterRange(TextDirection,
48 float totalWidth, 48 float totalWidth,
49 unsigned from, 49 unsigned from,
50 unsigned to) const; 50 unsigned to) const;
51 Vector<CharacterRange> individualCharacterRanges(TextDirection, 51 Vector<CharacterRange> individualCharacterRanges(TextDirection,
52 float totalWidth) const; 52 float totalWidth) const;
53 53
54 static CharacterRange getCharacterRange( 54 static CharacterRange getCharacterRange(RefPtr<const ShapeResult>,
55 TextDirection,
56 float totalWidth,
57 unsigned from,
58 unsigned to);
59
60 private:
61 static CharacterRange getCharacterRangeInternal(
55 const Vector<RefPtr<const ShapeResult>, 64>&, 62 const Vector<RefPtr<const ShapeResult>, 64>&,
56 TextDirection, 63 TextDirection,
57 float totalWidth, 64 float totalWidth,
58 unsigned from, 65 unsigned from,
59 unsigned to); 66 unsigned to);
60 67
61 private:
62 float fillFastHorizontalGlyphBuffer(GlyphBuffer*, const TextRun&) const; 68 float fillFastHorizontalGlyphBuffer(GlyphBuffer*, const TextRun&) const;
63 69
64 template <TextDirection> 70 template <TextDirection>
65 static float fillGlyphBufferForRun(GlyphBuffer*, 71 static float fillGlyphBufferForRun(GlyphBuffer*,
66 const ShapeResult::RunInfo*, 72 const ShapeResult::RunInfo*,
67 const TextRun&, 73 const TextRun&,
68 float initialAdvance, 74 float initialAdvance,
69 unsigned from, 75 unsigned from,
70 unsigned to, 76 unsigned to,
71 unsigned runOffset); 77 unsigned runOffset);
(...skipping 12 matching lines...) Expand all
84 90
85 // Empirically, cases where we get more than 50 ShapeResults are extremely 91 // Empirically, cases where we get more than 50 ShapeResults are extremely
86 // rare. 92 // rare.
87 Vector<RefPtr<const ShapeResult>, 64> m_results; 93 Vector<RefPtr<const ShapeResult>, 64> m_results;
88 bool m_hasVerticalOffsets; 94 bool m_hasVerticalOffsets;
89 }; 95 };
90 96
91 } // namespace blink 97 } // namespace blink
92 98
93 #endif // ShapeResultBuffer_h 99 #endif // ShapeResultBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698