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