OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrAtlasTextContext_DEFINED | 8 #ifndef GrAtlasTextContext_DEFINED |
9 #define GrAtlasTextContext_DEFINED | 9 #define GrAtlasTextContext_DEFINED |
10 | 10 |
11 #include "GrTextContext.h" | 11 #include "GrTextContext.h" |
12 | 12 |
13 #include "GrBatchAtlas.h" | |
14 #include "GrGeometryProcessor.h" | 13 #include "GrGeometryProcessor.h" |
15 #include "SkDescriptor.h" | 14 #include "SkDescriptor.h" |
16 #include "SkTextBlob.h" | 15 #include "SkTextBlob.h" |
17 #include "SkTHash.h" | 16 #include "SkTHash.h" |
18 | 17 |
19 class GrBatchTextStrike; | 18 class GrBatchTextStrike; |
20 class GrPipelineBuilder; | 19 class GrPipelineBuilder; |
21 | 20 |
22 /* | 21 /* |
23 * This class implements GrTextContext using standard bitmap fonts, and can also
process textblobs. | 22 * This class implements GrTextContext using standard bitmap fonts, and can also
process textblobs. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 , fGlyphStartIndex(0) | 96 , fGlyphStartIndex(0) |
98 , fGlyphEndIndex(0) | 97 , fGlyphEndIndex(0) |
99 , fVertexStartIndex(0) | 98 , fVertexStartIndex(0) |
100 , fVertexEndIndex(0) {} | 99 , fVertexEndIndex(0) {} |
101 GrMaskFormat fMaskFormat; | 100 GrMaskFormat fMaskFormat; |
102 uint64_t fAtlasGeneration; | 101 uint64_t fAtlasGeneration; |
103 uint32_t fGlyphStartIndex; | 102 uint32_t fGlyphStartIndex; |
104 uint32_t fGlyphEndIndex; | 103 uint32_t fGlyphEndIndex; |
105 size_t fVertexStartIndex; | 104 size_t fVertexStartIndex; |
106 size_t fVertexEndIndex; | 105 size_t fVertexEndIndex; |
107 GrBatchAtlas::BulkUseTokenUpdater fBulkUseToken; | |
108 }; | 106 }; |
109 SkSTArray<1, SubRunInfo, true> fSubRunInfo; | 107 SkSTArray<1, SubRunInfo, true> fSubRunInfo; |
110 SkAutoDescriptor fDescriptor; | 108 SkAutoDescriptor fDescriptor; |
111 SkAutoTUnref<SkTypeface> fTypeface; | 109 SkAutoTUnref<SkTypeface> fTypeface; |
112 SkRect fVertexBounds; | 110 SkRect fVertexBounds; |
113 GrColor fColor; | 111 GrColor fColor; |
114 bool fInitialized; | 112 bool fInitialized; |
115 bool fDrawAsPaths; | 113 bool fDrawAsPaths; |
116 }; | 114 }; |
117 | 115 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // TODO use real cache | 198 // TODO use real cache |
201 static void ClearCacheEntry(uint32_t key, BitmapTextBlob**); | 199 static void ClearCacheEntry(uint32_t key, BitmapTextBlob**); |
202 SkTHashMap<uint32_t, BitmapTextBlob*, BitmapTextBlob::Hash> fCache; | 200 SkTHashMap<uint32_t, BitmapTextBlob*, BitmapTextBlob::Hash> fCache; |
203 | 201 |
204 friend class BitmapTextBatch; | 202 friend class BitmapTextBatch; |
205 | 203 |
206 typedef GrTextContext INHERITED; | 204 typedef GrTextContext INHERITED; |
207 }; | 205 }; |
208 | 206 |
209 #endif | 207 #endif |
OLD | NEW |