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 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 ::operator delete(target, placement); | 135 ::operator delete(target, placement); |
136 } | 136 } |
137 }; | 137 }; |
138 | 138 |
139 typedef BitmapTextBlob::Run Run; | 139 typedef BitmapTextBlob::Run Run; |
140 typedef Run::SubRunInfo PerSubRunInfo; | 140 typedef Run::SubRunInfo PerSubRunInfo; |
141 | 141 |
142 BitmapTextBlob* CreateBlob(int glyphCount, int runCount); | 142 BitmapTextBlob* CreateBlob(int glyphCount, int runCount); |
143 | 143 |
144 void appendGlyph(BitmapTextBlob*, int runIndex, GrGlyph::PackedID, int left,
int top, | 144 void appendGlyph(BitmapTextBlob*, int runIndex, GrGlyph::PackedID, int left,
int top, |
145 GrFontScaler*, const SkIRect& clipRect); | 145 GrColor color, GrFontScaler*, const SkIRect& clipRect); |
146 void flush(GrDrawTarget*, BitmapTextBlob*, GrRenderTarget*, const GrPaint&,
const GrClip&, | 146 void flush(GrDrawTarget*, BitmapTextBlob*, GrRenderTarget*, const GrPaint&,
const GrClip&, |
147 const SkMatrix& viewMatrix, int paintAlpha); | 147 const SkMatrix& viewMatrix, int paintAlpha); |
148 | 148 |
149 void internalDrawText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const Sk
Paint&, | 149 void internalDrawText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const Sk
Paint&, |
150 const SkMatrix& viewMatrix, const char text[], size_t
byteLength, | 150 const SkMatrix& viewMatrix, const char text[], size_t
byteLength, |
151 SkScalar x, SkScalar y, const SkIRect& clipRect); | 151 SkScalar x, SkScalar y, const SkIRect& clipRect); |
152 void internalDrawPosText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const
SkPaint&, | 152 void internalDrawPosText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const
SkPaint&, |
153 const SkMatrix& viewMatrix, | 153 const SkMatrix& viewMatrix, |
154 const char text[], size_t byteLength, | 154 const char text[], size_t byteLength, |
155 const SkScalar pos[], int scalarsPerPosition, | 155 const SkScalar pos[], int scalarsPerPosition, |
(...skipping 17 matching lines...) Expand all Loading... |
173 // TODO use real cache | 173 // TODO use real cache |
174 static void ClearCacheEntry(uint32_t key, BitmapTextBlob**); | 174 static void ClearCacheEntry(uint32_t key, BitmapTextBlob**); |
175 SkTHashMap<uint32_t, BitmapTextBlob*, BitmapTextBlob::Hash> fCache; | 175 SkTHashMap<uint32_t, BitmapTextBlob*, BitmapTextBlob::Hash> fCache; |
176 | 176 |
177 friend class BitmapTextBatch; | 177 friend class BitmapTextBatch; |
178 | 178 |
179 typedef GrTextContext INHERITED; | 179 typedef GrTextContext INHERITED; |
180 }; | 180 }; |
181 | 181 |
182 #endif | 182 #endif |
OLD | NEW |