OLD | NEW |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // For memory reporting. | 71 // For memory reporting. |
72 size_t byteSize() const; | 72 size_t byteSize() const; |
73 | 73 |
74 int offsetForPosition(float targetX, bool includePartialGlyphs) const; | 74 int offsetForPosition(float targetX, bool includePartialGlyphs) const; |
75 | 75 |
76 PassRefPtr<ShapeResult> applySpacingToCopy(ShapeResultSpacing&, | 76 PassRefPtr<ShapeResult> applySpacingToCopy(ShapeResultSpacing&, |
77 const TextRun&) const; | 77 const TextRun&) const; |
78 | 78 |
79 protected: | 79 protected: |
80 struct RunInfo; | 80 struct RunInfo; |
81 #if COMPILER(MSVC) | |
82 friend struct ::WTF::OwnedPtrDeleter<RunInfo>; | |
83 #endif | |
84 | 81 |
85 ShapeResult(const Font*, unsigned numCharacters, TextDirection); | 82 ShapeResult(const Font*, unsigned numCharacters, TextDirection); |
86 ShapeResult(const ShapeResult&); | 83 ShapeResult(const ShapeResult&); |
87 | 84 |
88 static PassRefPtr<ShapeResult> create(const ShapeResult& other) | 85 static PassRefPtr<ShapeResult> create(const ShapeResult& other) |
89 { | 86 { |
90 return adoptRef(new ShapeResult(other)); | 87 return adoptRef(new ShapeResult(other)); |
91 } | 88 } |
92 | 89 |
93 void applySpacing(ShapeResultSpacing&, const TextRun&); | 90 void applySpacing(ShapeResultSpacing&, const TextRun&); |
(...skipping 16 matching lines...) Expand all Loading... |
110 // Tracks whether any runs contain glyphs with a y-offset != 0. | 107 // Tracks whether any runs contain glyphs with a y-offset != 0. |
111 unsigned m_hasVerticalOffsets : 1; | 108 unsigned m_hasVerticalOffsets : 1; |
112 | 109 |
113 friend class HarfBuzzShaper; | 110 friend class HarfBuzzShaper; |
114 friend class ShapeResultBuffer; | 111 friend class ShapeResultBuffer; |
115 }; | 112 }; |
116 | 113 |
117 } // namespace blink | 114 } // namespace blink |
118 | 115 |
119 #endif // ShapeResult_h | 116 #endif // ShapeResult_h |
OLD | NEW |