OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2009, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007-2008 Torch Mobile Inc. | 3 * Copyright (C) 2007-2008 Torch Mobile Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 protected: | 84 protected: |
85 Vector<const SimpleFontData*, 2048> m_fontData; | 85 Vector<const SimpleFontData*, 2048> m_fontData; |
86 Vector<Glyph, 2048> m_glyphs; | 86 Vector<Glyph, 2048> m_glyphs; |
87 Vector<float, 2048> m_advances; | 87 Vector<float, 2048> m_advances; |
88 }; | 88 }; |
89 | 89 |
90 | 90 |
91 class GlyphBufferWithOffsets : public GlyphBuffer { | 91 class GlyphBufferWithOffsets : public GlyphBuffer { |
92 public: | 92 public: |
93 virtual bool hasOffsets() const OVERRIDE { return true; } | 93 virtual bool hasOffsets() const override { return true; } |
94 | 94 |
95 const FloatSize* offsets(unsigned from) const { return m_offsets.data() + fr
om; } | 95 const FloatSize* offsets(unsigned from) const { return m_offsets.data() + fr
om; } |
96 | 96 |
97 FloatSize offsetAt(unsigned index) const | 97 FloatSize offsetAt(unsigned index) const |
98 { | 98 { |
99 return m_offsets[index]; | 99 return m_offsets[index]; |
100 } | 100 } |
101 | 101 |
102 void add(Glyph glyph, const SimpleFontData* font, const FloatSize& offset, f
loat advance) | 102 void add(Glyph glyph, const SimpleFontData* font, const FloatSize& offset, f
loat advance) |
103 { | 103 { |
(...skipping 13 matching lines...) Expand all Loading... |
117 { | 117 { |
118 ASSERT_NOT_REACHED(); | 118 ASSERT_NOT_REACHED(); |
119 } | 119 } |
120 | 120 |
121 Vector<FloatSize, 1024> m_offsets; | 121 Vector<FloatSize, 1024> m_offsets; |
122 }; | 122 }; |
123 | 123 |
124 } // namespace blink | 124 } // namespace blink |
125 | 125 |
126 #endif | 126 #endif |
OLD | NEW |