OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 class PLATFORM_EXPORT CachingWordShaper final { | 42 class PLATFORM_EXPORT CachingWordShaper final { |
43 public: | 43 public: |
44 CachingWordShaper(); | 44 CachingWordShaper(); |
45 ~CachingWordShaper(); | 45 ~CachingWordShaper(); |
46 void clear(); | 46 void clear(); |
47 | 47 |
48 float width(const Font*, const TextRun&, | 48 float width(const Font*, const TextRun&, |
49 HashSet<const SimpleFontData*>* fallbackFonts, | 49 HashSet<const SimpleFontData*>* fallbackFonts, |
50 FloatRect* glyphBounds); | 50 FloatRect* glyphBounds); |
| 51 int offsetForPosition(const Font*, const TextRun&, float targetX); |
51 float fillGlyphBuffer(const Font*, const TextRun&, | 52 float fillGlyphBuffer(const Font*, const TextRun&, |
52 HashSet<const SimpleFontData*>*, GlyphBuffer*, | 53 HashSet<const SimpleFontData*>*, GlyphBuffer*, |
53 unsigned from, unsigned to); | 54 unsigned from, unsigned to); |
54 float fillGlyphBufferForTextEmphasis(const Font*, const TextRun&, | 55 float fillGlyphBufferForTextEmphasis(const Font*, const TextRun&, |
55 const GlyphData* emphasisData, GlyphBuffer*, | 56 const GlyphData* emphasisData, GlyphBuffer*, |
56 unsigned from, unsigned to); | 57 unsigned from, unsigned to); |
57 FloatRect selectionRect(const Font*, const TextRun&, const FloatPoint&, | 58 FloatRect selectionRect(const Font*, const TextRun&, const FloatPoint&, |
58 int height, unsigned from, unsigned to); | 59 int height, unsigned from, unsigned to); |
59 | 60 |
60 private: | 61 private: |
61 ShapeCache* m_shapeCache; | 62 ShapeCache* m_shapeCache; |
62 }; | 63 }; |
63 | 64 |
64 } // namespace blink | 65 } // namespace blink |
65 | 66 |
66 #endif // CachingWordShaper_h | 67 #endif // CachingWordShaper_h |
OLD | NEW |