blob: d5fa0d7849268a1bc1859d7842cc9d946d3613f7 [file] [log] [blame]
joshualitt1d89e8d2015-04-01 12:40:54 -07001/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrAtlasTextContext_DEFINED
9#define GrAtlasTextContext_DEFINED
10
11#include "GrTextContext.h"
12
joshualittb4c507e2015-04-08 08:07:59 -070013#include "GrBatchAtlas.h"
joshualitt1d89e8d2015-04-01 12:40:54 -070014#include "GrGeometryProcessor.h"
15#include "SkDescriptor.h"
joshualittb7133be2015-04-08 09:08:31 -070016#include "GrMemoryPool.h"
joshualitt53b5f442015-04-13 06:33:59 -070017#include "SkMaskFilter.h"
joshualitt9a27e632015-04-06 10:53:36 -070018#include "SkTextBlob.h"
joshualittb7133be2015-04-08 09:08:31 -070019#include "SkTInternalLList.h"
joshualitt1d89e8d2015-04-01 12:40:54 -070020
21class GrBatchTextStrike;
22class GrPipelineBuilder;
joshualittb7133be2015-04-08 09:08:31 -070023class GrTextBlobCache;
joshualitt1d89e8d2015-04-01 12:40:54 -070024
25/*
26 * This class implements GrTextContext using standard bitmap fonts, and can also process textblobs.
27 * TODO replace GrBitmapTextContext
28 */
joshualittdbd35932015-04-02 09:19:04 -070029class GrAtlasTextContext : public GrTextContext {
joshualitt1d89e8d2015-04-01 12:40:54 -070030public:
joshualitt9bd2daf2015-04-17 09:30:06 -070031 static GrAtlasTextContext* Create(GrContext*, SkGpuDevice*, const SkDeviceProperties&,
32 bool enableDistanceFields);
joshualitt1d89e8d2015-04-01 12:40:54 -070033
joshualitt1d89e8d2015-04-01 12:40:54 -070034private:
joshualitt9bd2daf2015-04-17 09:30:06 -070035 GrAtlasTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&,
36 bool enableDistanceFields);
37 ~GrAtlasTextContext() override {}
joshualitt1d89e8d2015-04-01 12:40:54 -070038
39 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&,
40 const SkPaint&, const SkMatrix& viewMatrix) override;
41
42 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
43 const SkMatrix& viewMatrix, const char text[], size_t byteLength,
44 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) override;
45 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
46 const SkMatrix& viewMatrix,
47 const char text[], size_t byteLength,
48 const SkScalar pos[], int scalarsPerPosition,
49 const SkPoint& offset, const SkIRect& regionClipBounds) override;
50 void drawTextBlob(GrRenderTarget*, const GrClip&, const SkPaint&,
51 const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x, SkScalar y,
52 SkDrawFilter*, const SkIRect& clipBounds) override;
53
joshualitt1d89e8d2015-04-01 12:40:54 -070054 /*
55 * A BitmapTextBlob contains a fully processed SkTextBlob, suitable for nearly immediate drawing
56 * on the GPU. These are initially created with valid positions and colors, but invalid
57 * texture coordinates. The BitmapTextBlob itself has a few Blob-wide properties, and also
58 * consists of a number of runs. Runs inside a blob are flushed individually so they can be
59 * reordered.
60 *
61 * The only thing(aside from a memcopy) required to flush a BitmapTextBlob is to ensure that
62 * the GrAtlas will not evict anything the Blob needs.
joshualitt1d89e8d2015-04-01 12:40:54 -070063 */
joshualitt9e36c1a2015-04-14 12:17:27 -070064 // TODO Pack these bytes
joshualitt1d89e8d2015-04-01 12:40:54 -070065 struct BitmapTextBlob : public SkRefCnt {
joshualittb7133be2015-04-08 09:08:31 -070066 SK_DECLARE_INTERNAL_LLIST_INTERFACE(BitmapTextBlob);
67
joshualitt9a27e632015-04-06 10:53:36 -070068 /*
69 * Each Run inside of the blob can have its texture coordinates regenerated if required.
70 * To determine if regeneration is necessary, fAtlasGeneration is used. If there have been
71 * any evictions inside of the atlas, then we will simply regenerate Runs. We could track
72 * this at a more fine grained level, but its not clear if this is worth it, as evictions
73 * should be fairly rare.
74 *
75 * One additional point, each run can contain glyphs with any of the three mask formats.
76 * We call these SubRuns. Because a subrun must be a contiguous range, we have to create
77 * a new subrun each time the mask format changes in a run. In theory, a run can have as
78 * many SubRuns as it has glyphs, ie if a run alternates between color emoji and A8. In
79 * practice, the vast majority of runs have only a single subrun.
80 *
81 * Finally, for runs where the entire thing is too large for the GrAtlasTextContext to
82 * handle, we have a bit to mark the run as flusahable via rendering as paths. It is worth
83 * pointing. It would be a bit expensive to figure out ahead of time whether or not a run
84 * can flush in this manner, so we always allocate vertices for the run, regardless of
85 * whether or not it is too large. The benefit of this strategy is that we can always reuse
86 * a blob allocation regardless of viewmatrix changes. We could store positions for these
87 * glyphs. However, its not clear if this is a win because we'd still have to either go the
88 * glyph cache to get the path at flush time, or hold onto the path in the cache, which
89 * would greatly increase the memory of these cached items.
90 */
joshualitt1d89e8d2015-04-01 12:40:54 -070091 struct Run {
joshualittc3c59902015-04-14 14:33:37 -070092 Run()
93 : fColor(GrColor_ILLEGAL)
94 , fInitialized(false)
95 , fDrawAsPaths(false) {
joshualitt1d89e8d2015-04-01 12:40:54 -070096 fVertexBounds.setLargestInverted();
joshualitt1d89e8d2015-04-01 12:40:54 -070097 }
98 struct SubRunInfo {
99 SubRunInfo()
100 : fAtlasGeneration(GrBatchAtlas::kInvalidAtlasGeneration)
joshualitt1d89e8d2015-04-01 12:40:54 -0700101 , fVertexStartIndex(0)
joshualitt9bd2daf2015-04-17 09:30:06 -0700102 , fVertexEndIndex(0)
joshualitt8672f4d2015-04-21 08:03:04 -0700103 , fGlyphStartIndex(0)
104 , fGlyphEndIndex(0)
joshualitt9bd2daf2015-04-17 09:30:06 -0700105 , fDrawAsDistanceFields(false) {}
joshualittfec19e12015-04-17 10:32:32 -0700106 // Distance field text cannot draw coloremoji, and so has to fall back. However,
107 // though the distance field text and the coloremoji may share the same run, they
108 // will have different descriptors. If fOverrideDescriptor is non-NULL, then it
109 // will be used in place of the run's descriptor to regen texture coords
110 // TODO we could have a descriptor cache, it would reduce the size of these blobs
111 // significantly, and then the subrun could just have a refed pointer to the
112 // correct descriptor.
joshualitt8672f4d2015-04-21 08:03:04 -0700113 SkAutoTDelete<SkAutoDescriptor> fOverrideDescriptor; // df properties
114 GrBatchAtlas::BulkUseTokenUpdater fBulkUseToken;
115 uint64_t fAtlasGeneration;
116 size_t fVertexStartIndex;
117 size_t fVertexEndIndex;
118 uint32_t fGlyphStartIndex;
119 uint32_t fGlyphEndIndex;
120 SkScalar fTextRatio; // df property
121 GrMaskFormat fMaskFormat;
122 bool fDrawAsDistanceFields; // df property
123 bool fUseLCDText; // df property
joshualitt1d89e8d2015-04-01 12:40:54 -0700124 };
joshualittc3c59902015-04-14 14:33:37 -0700125
126 class SubRunInfoArray {
127 public:
128 SubRunInfoArray()
129 : fSubRunCount(0)
130 , fSubRunAllocation(kMinSubRuns) {
joshualittfec19e12015-04-17 10:32:32 -0700131 SK_COMPILE_ASSERT(kMinSubRuns > 0, insufficient_subrun_allocation);
132 // We always seed with one here, so we can assume a valid subrun during
133 // push_back
joshualittc3c59902015-04-14 14:33:37 -0700134 fPtr = reinterpret_cast<SubRunInfo*>(fSubRunStorage.get());
joshualittfec19e12015-04-17 10:32:32 -0700135 SkNEW_PLACEMENT(&fPtr[fSubRunCount++], SubRunInfo);
136 }
137 ~SubRunInfoArray() {
138 for (int i = 0; i < fSubRunCount; i++) {
139 fPtr[i].~SubRunInfo();
140 }
joshualittc3c59902015-04-14 14:33:37 -0700141 }
142
143 int count() const { return fSubRunCount; }
144 SubRunInfo& back() { return fPtr[fSubRunCount - 1]; }
145 SubRunInfo& push_back() {
146 if (fSubRunCount >= fSubRunAllocation) {
147 fSubRunAllocation = fSubRunAllocation << 1;
148 fSubRunStorage.realloc(fSubRunAllocation * sizeof(SubRunInfo));
149 fPtr = reinterpret_cast<SubRunInfo*>(fSubRunStorage.get());
150 }
151 SkNEW_PLACEMENT(&fPtr[fSubRunCount], SubRunInfo);
joshualittfec19e12015-04-17 10:32:32 -0700152
153 // Forward glyph / vertex information to seed the new sub run
154 SubRunInfo& newSubRun = fPtr[fSubRunCount];
155 SubRunInfo& prevSubRun = fPtr[fSubRunCount - 1];
156 newSubRun.fGlyphStartIndex = prevSubRun.fGlyphEndIndex;
157 newSubRun.fGlyphEndIndex = prevSubRun.fGlyphEndIndex;
158
159 newSubRun.fVertexStartIndex = prevSubRun.fVertexEndIndex;
160 newSubRun.fVertexEndIndex = prevSubRun.fVertexEndIndex;
joshualittc3c59902015-04-14 14:33:37 -0700161 return fPtr[fSubRunCount++];
162 }
163 SubRunInfo& operator[](int index) {
164 return fPtr[index];
165 }
166 const SubRunInfo& operator[](int index) const {
167 return fPtr[index];
168 }
169
170 private:
171 static const int kMinSubRuns = 1;
172 static const int kMinSubRunStorage = kMinSubRuns * sizeof(SubRunInfo);
joshualitt8672f4d2015-04-21 08:03:04 -0700173 SubRunInfo* fPtr;
joshualittc3c59902015-04-14 14:33:37 -0700174 SkAutoSTMalloc<kMinSubRunStorage, unsigned char> fSubRunStorage;
175 int fSubRunCount;
176 int fSubRunAllocation;
joshualittc3c59902015-04-14 14:33:37 -0700177 };
joshualitt1d89e8d2015-04-01 12:40:54 -0700178 SkAutoTUnref<SkTypeface> fTypeface;
179 SkRect fVertexBounds;
joshualitt8672f4d2015-04-21 08:03:04 -0700180 SubRunInfoArray fSubRunInfo;
181 SkAutoDescriptor fDescriptor;
joshualitt1d89e8d2015-04-01 12:40:54 -0700182 GrColor fColor;
183 bool fInitialized;
joshualitt9a27e632015-04-06 10:53:36 -0700184 bool fDrawAsPaths;
joshualitt1d89e8d2015-04-01 12:40:54 -0700185 };
186
187 struct BigGlyph {
188 BigGlyph(const SkPath& path, int vx, int vy) : fPath(path), fVx(vx), fVy(vy) {}
189 SkPath fPath;
190 int fVx;
191 int fVy;
192 };
joshualitt1d89e8d2015-04-01 12:40:54 -0700193
joshualitt53b5f442015-04-13 06:33:59 -0700194 struct Key {
195 Key() {
joshualitt9e36c1a2015-04-14 12:17:27 -0700196 sk_bzero(this, sizeof(Key));
joshualitt53b5f442015-04-13 06:33:59 -0700197 }
198 uint32_t fUniqueID;
199 SkPaint::Style fStyle;
joshualitt9e36c1a2015-04-14 12:17:27 -0700200 // Color may affect the gamma of the mask we generate, but in a fairly limited way.
201 // Each color is assigned to on of a fixed number of buckets based on its
202 // luminance. For each luminance bucket there is a "canonical color" that
203 // represents the bucket. This functionality is currently only supported for A8
204 SkColor fCanonicalColor;
joshualitt53b5f442015-04-13 06:33:59 -0700205 bool fHasBlur;
206
207 bool operator==(const Key& other) const {
208 return 0 == memcmp(this, &other, sizeof(Key));
209 }
210 };
joshualitt8672f4d2015-04-21 08:03:04 -0700211
212 struct StrokeInfo {
213 SkScalar fFrameWidth;
214 SkScalar fMiterLimit;
215 SkPaint::Join fJoin;
216 };
217
218 enum TextType {
219 kHasDistanceField_TextType = 0x1,
220 kHasBitmap_TextType = 0x2,
221 };
222
223 // all glyph / vertex offsets are into these pools.
224 unsigned char* fVertices;
225 GrGlyph::PackedID* fGlyphIDs;
226 Run* fRuns;
227 GrMemoryPool* fPool;
228 SkMaskFilter::BlurRec fBlurRec;
229 StrokeInfo fStrokeInfo;
230 SkTArray<BigGlyph> fBigGlyphs;
joshualitt53b5f442015-04-13 06:33:59 -0700231 Key fKey;
joshualitt8672f4d2015-04-21 08:03:04 -0700232 SkMatrix fViewMatrix;
233#ifdef SK_DEBUG
234 mutable SkScalar fTotalXError;
235 mutable SkScalar fTotalYError;
236#endif
237 SkScalar fX;
238 SkScalar fY;
239 SkColor fPaintColor;
240 int fRunCount;
241 uint8_t fTextType;
242
243 BitmapTextBlob() : fTextType(0) {}
joshualitt53b5f442015-04-13 06:33:59 -0700244
245 static const Key& GetKey(const BitmapTextBlob& blob) {
246 return blob.fKey;
joshualittb7133be2015-04-08 09:08:31 -0700247 }
248
joshualitt53b5f442015-04-13 06:33:59 -0700249 static uint32_t Hash(const Key& key) {
250 return SkChecksum::Murmur3(&key, sizeof(Key));
joshualitt1d89e8d2015-04-01 12:40:54 -0700251 }
252
joshualittb7133be2015-04-08 09:08:31 -0700253 void operator delete(void* p) {
254 BitmapTextBlob* blob = reinterpret_cast<BitmapTextBlob*>(p);
255 blob->fPool->release(p);
256 }
joshualitt1d89e8d2015-04-01 12:40:54 -0700257 void* operator new(size_t) {
258 SkFAIL("All blobs are created by placement new.");
259 return sk_malloc_throw(0);
260 }
261
262 void* operator new(size_t, void* p) { return p; }
263 void operator delete(void* target, void* placement) {
264 ::operator delete(target, placement);
265 }
joshualittfcfb9fc2015-04-21 07:35:10 -0700266
267 bool hasDistanceField() const { return SkToBool(fTextType & kHasDistanceField_TextType); }
268 bool hasBitmap() const { return SkToBool(fTextType & kHasBitmap_TextType); }
269 void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; }
270 void setHasBitmap() { fTextType |= kHasBitmap_TextType; }
joshualitt1d89e8d2015-04-01 12:40:54 -0700271 };
272
273 typedef BitmapTextBlob::Run Run;
274 typedef Run::SubRunInfo PerSubRunInfo;
275
joshualitt9bd2daf2015-04-17 09:30:06 -0700276 inline bool canDrawAsDistanceFields(const SkPaint&, const SkMatrix& viewMatrix);
277 BitmapTextBlob* setupDFBlob(int glyphCount, const SkPaint& origPaint,
278 const SkMatrix& viewMatrix, SkGlyphCache** cache,
279 SkPaint* dfPaint, SkScalar* textRatio);
280 void bmpAppendGlyph(BitmapTextBlob*, int runIndex, GrGlyph::PackedID, int left, int top,
281 GrColor color, GrFontScaler*, const SkIRect& clipRect);
282 bool dfAppendGlyph(BitmapTextBlob*, int runIndex, GrGlyph::PackedID, SkScalar sx, SkScalar sy,
283 GrColor color, GrFontScaler*, const SkIRect& clipRect, SkScalar textRatio,
284 const SkMatrix& viewMatrix);
285 inline void appendGlyphPath(BitmapTextBlob* blob, GrGlyph* glyph,
286 GrFontScaler* scaler, int x, int y);
287 inline void appendGlyphCommon(BitmapTextBlob*, Run*, Run::SubRunInfo*,
288 const SkRect& positions, GrColor color,
289 size_t vertexStride, bool useVertexColor,
290 GrGlyph::PackedID);
joshualitt9a27e632015-04-06 10:53:36 -0700291
292 inline void flushRunAsPaths(const SkTextBlob::RunIterator&, const SkPaint&, SkDrawFilter*,
293 const SkMatrix& viewMatrix, const SkIRect& clipBounds, SkScalar x,
294 SkScalar y);
295 inline void flushRun(GrDrawTarget*, GrPipelineBuilder*, BitmapTextBlob*, int run, GrColor,
joshualitt9bd2daf2015-04-17 09:30:06 -0700296 SkScalar transX, SkScalar transY, const SkPaint&);
joshualitt9a27e632015-04-06 10:53:36 -0700297 inline void flushBigGlyphs(BitmapTextBlob* cacheBlob, GrRenderTarget* rt,
joshualitt2a0e9f32015-04-13 06:12:21 -0700298 const GrPaint& grPaint, const GrClip& clip,
299 SkScalar transX, SkScalar transY);
joshualitt9a27e632015-04-06 10:53:36 -0700300
301 // We have to flush SkTextBlobs differently from drawText / drawPosText
302 void flush(GrDrawTarget*, const SkTextBlob*, BitmapTextBlob*, GrRenderTarget*, const SkPaint&,
303 const GrPaint&, SkDrawFilter*, const GrClip&, const SkMatrix& viewMatrix,
joshualitt2a0e9f32015-04-13 06:12:21 -0700304 const SkIRect& clipBounds, SkScalar x, SkScalar y, SkScalar transX, SkScalar transY);
joshualitt9a27e632015-04-06 10:53:36 -0700305 void flush(GrDrawTarget*, BitmapTextBlob*, GrRenderTarget*, const SkPaint&,
joshualitt9bd2daf2015-04-17 09:30:06 -0700306 const GrPaint&, const GrClip&);
joshualitt1d89e8d2015-04-01 12:40:54 -0700307
joshualitt9bd2daf2015-04-17 09:30:06 -0700308 // A helper for drawing BitmapText in a run of distance fields
joshualittfcfb9fc2015-04-21 07:35:10 -0700309 inline void fallbackDrawPosText(BitmapTextBlob*, int runIndex,
310 GrRenderTarget*, const GrClip&,
joshualitt9bd2daf2015-04-17 09:30:06 -0700311 const GrPaint&,
312 const SkPaint&, const SkMatrix& viewMatrix,
313 const SkTDArray<char>& fallbackTxt,
314 const SkTDArray<SkScalar>& fallbackPos,
315 int scalarsPerPosition,
316 const SkPoint& offset,
317 const SkIRect& clipRect);
318
319 void internalDrawBMPText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const SkPaint&,
joshualitt9e36c1a2015-04-14 12:17:27 -0700320 GrColor color, const SkMatrix& viewMatrix,
joshualitt1d89e8d2015-04-01 12:40:54 -0700321 const char text[], size_t byteLength,
joshualitt9bd2daf2015-04-17 09:30:06 -0700322 SkScalar x, SkScalar y, const SkIRect& clipRect);
323 void internalDrawBMPPosText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const SkPaint&,
324 GrColor color, const SkMatrix& viewMatrix,
325 const char text[], size_t byteLength,
326 const SkScalar pos[], int scalarsPerPosition,
327 const SkPoint& offset, const SkIRect& clipRect);
328
329 void internalDrawDFText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const SkPaint&,
330 GrColor color, const SkMatrix& viewMatrix,
331 const char text[], size_t byteLength,
332 SkScalar x, SkScalar y, const SkIRect& clipRect,
333 SkScalar textRatio,
334 SkTDArray<char>* fallbackTxt,
335 SkTDArray<SkScalar>* fallbackPos,
336 SkPoint* offset, const SkPaint& origPaint);
337 void internalDrawDFPosText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const SkPaint&,
338 GrColor color, const SkMatrix& viewMatrix,
339 const char text[], size_t byteLength,
340 const SkScalar pos[], int scalarsPerPosition,
341 const SkPoint& offset, const SkIRect& clipRect,
342 SkScalar textRatio,
343 SkTDArray<char>* fallbackTxt,
344 SkTDArray<SkScalar>* fallbackPos);
joshualitt1d89e8d2015-04-01 12:40:54 -0700345
346 // sets up the descriptor on the blob and returns a detached cache. Client must attach
joshualitt9e36c1a2015-04-14 12:17:27 -0700347 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd);
joshualitt9bd2daf2015-04-17 09:30:06 -0700348 inline SkGlyphCache* setupCache(Run*, const SkPaint&, const SkMatrix* viewMatrix, bool noGamma);
joshualitt2a0e9f32015-04-13 06:12:21 -0700349 static inline bool MustRegenerateBlob(SkScalar* outTransX, SkScalar* outTransY,
350 const BitmapTextBlob&, const SkPaint&,
joshualitt53b5f442015-04-13 06:33:59 -0700351 const SkMaskFilter::BlurRec&,
joshualitt1d89e8d2015-04-01 12:40:54 -0700352 const SkMatrix& viewMatrix, SkScalar x, SkScalar y);
joshualitt9e36c1a2015-04-14 12:17:27 -0700353 void regenerateTextBlob(BitmapTextBlob* bmp, const SkPaint& skPaint, GrColor,
354 const SkMatrix& viewMatrix,
joshualitt1d89e8d2015-04-01 12:40:54 -0700355 const SkTextBlob* blob, SkScalar x, SkScalar y,
joshualittfcfb9fc2015-04-21 07:35:10 -0700356 SkDrawFilter* drawFilter, const SkIRect& clipRect, GrRenderTarget*,
357 const GrClip&, const GrPaint&);
joshualitt9e36c1a2015-04-14 12:17:27 -0700358 inline static bool HasLCD(const SkTextBlob*);
joshualitt9bd2daf2015-04-17 09:30:06 -0700359 inline void initDistanceFieldPaint(SkPaint*, SkScalar* textRatio, const SkMatrix&);
360
361 // Distance field text needs this table to compute a value for use in the fragment shader.
362 // Because the GrAtlasTextContext can go out of scope before the final flush, this needs to be
363 // refcnted and malloced
364 struct DistanceAdjustTable : public SkNVRefCnt<DistanceAdjustTable> {
365 DistanceAdjustTable(float gamma) { this->buildDistanceAdjustTable(gamma); }
366 ~DistanceAdjustTable() { SkDELETE_ARRAY(fTable); }
367
368 void buildDistanceAdjustTable(float gamma);
369
370 SkScalar& operator[] (int i) {
371 return fTable[i];
372 }
373
374 const SkScalar& operator[] (int i) const {
375 return fTable[i];
376 }
377
378 SkScalar* fTable;
379 };
joshualitt1d89e8d2015-04-01 12:40:54 -0700380
joshualitt1d89e8d2015-04-01 12:40:54 -0700381 GrBatchTextStrike* fCurrStrike;
joshualittb7133be2015-04-08 09:08:31 -0700382 GrTextBlobCache* fCache;
joshualitt9bd2daf2015-04-17 09:30:06 -0700383 bool fEnableDFRendering;
384 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable;
joshualitt1d89e8d2015-04-01 12:40:54 -0700385
joshualittb7133be2015-04-08 09:08:31 -0700386 friend class GrTextBlobCache;
joshualitt1d89e8d2015-04-01 12:40:54 -0700387 friend class BitmapTextBatch;
388
389 typedef GrTextContext INHERITED;
390};
391
392#endif