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

Side by Side Diff: Source/platform/fonts/shaping/CachingWordShaper.h

Issue 1248453004: Change Font::offsetForPositionForComplexText to use CachingWordShapeIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TestExpectations and rebase Created 5 years, 5 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 /* 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698