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

Side by Side Diff: src/core/SkTextToPathIter.h

Issue 1718423002: Simplify and combine SkDrawCacheProc and SkMeasureCacheProc to SkPaint::GlyphCacheProc. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkTextToPathIter_DEFINED 8 #ifndef SkTextToPathIter_DEFINED
9 #define SkTextToPathIter_DEFINED 9 #define SkTextToPathIter_DEFINED
10 10
11 #include "SkAutoKern.h" 11 #include "SkAutoKern.h"
12 #include "SkPaint.h" 12 #include "SkPaint.h"
13 13
14 class SkGlyphCache; 14 class SkGlyphCache;
15 15
16 class SkTextBaseIter { 16 class SkTextBaseIter {
17 protected: 17 protected:
18 SkTextBaseIter(const char text[], size_t length, const SkPaint& paint, 18 SkTextBaseIter(const char text[], size_t length, const SkPaint& paint,
19 bool applyStrokeAndPathEffects); 19 bool applyStrokeAndPathEffects);
20 ~SkTextBaseIter(); 20 ~SkTextBaseIter();
21 21
22 SkGlyphCache* fCache; 22 SkGlyphCache* fCache;
23 SkPaint fPaint; 23 SkPaint fPaint;
24 SkScalar fScale; 24 SkScalar fScale;
25 SkFixed fPrevAdvance; 25 SkFixed fPrevAdvance;
26 const char* fText; 26 const char* fText;
27 const char* fStop; 27 const char* fStop;
28 SkMeasureCacheProc fGlyphCacheProc; 28 SkPaint::GlyphCacheProc fGlyphCacheProc;
29 29
30 SkScalar fXPos; // accumulated xpos, returned in next 30 SkScalar fXPos; // accumulated xpos, returned in next
31 SkAutoKern fAutoKern; 31 SkAutoKern fAutoKern;
32 int fXYIndex; // cache for horizontal -vs- vertical text 32 int fXYIndex; // cache for horizontal -vs- vertical text
33 }; 33 };
34 34
35 class SkTextToPathIter : SkTextBaseIter { 35 class SkTextToPathIter : SkTextBaseIter {
36 public: 36 public:
37 SkTextToPathIter(const char text[], size_t length, const SkPaint& paint, 37 SkTextToPathIter(const char text[], size_t length, const SkPaint& paint,
38 bool applyStrokeAndPathEffects) 38 bool applyStrokeAndPathEffects)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 fPrevAdvance = 0; 94 fPrevAdvance = 0;
95 } 95 }
96 96
97 private: 97 private:
98 SkScalar fBounds[2]; 98 SkScalar fBounds[2];
99 SkScalar fBoundsBase[2]; 99 SkScalar fBoundsBase[2];
100 TextType fTextType; 100 TextType fTextType;
101 }; 101 };
102 102
103 #endif 103 #endif
OLDNEW
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698