| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |