| 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 "GrAtlasTextBlob.h" | 13 #include "GrAtlasTextBlob.h" |
| 14 #include "GrGeometryProcessor.h" | 14 #include "GrGeometryProcessor.h" |
| 15 #include "SkTextBlobRunIterator.h" | 15 #include "SkTextBlobRunIterator.h" |
| 16 | 16 |
| 17 #ifdef GR_TEST_UTILS | 17 #ifdef GR_TEST_UTILS |
| 18 #include "GrBatchTest.h" | 18 #include "GrBatchTest.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 class GrDrawBatch; | 21 class GrDrawBatch; |
| 22 class GrDrawContext; | 22 class GrDrawContext; |
| 23 class GrDrawTarget; | 23 class GrDrawTarget; |
| 24 class GrPipelineBuilder; | 24 class GrPipelineBuilder; |
| 25 class GrTextBlobCache; | 25 class GrTextBlobCache; |
| 26 class SkGlyph; | 26 class SkGlyph; |
| 27 | 27 |
| 28 /* | 28 /* |
| 29 * This class implements GrTextContext using standard bitmap fonts, and can also
process textblobs. | 29 * This class implements GrTextContext using standard bitmap fonts, and can also
process textblobs. |
| 30 * TODO replace GrBitmapTextContext | |
| 31 */ | 30 */ |
| 32 class GrAtlasTextContext : public GrTextContext { | 31 class GrAtlasTextContext : public GrTextContext { |
| 33 public: | 32 public: |
| 34 static GrAtlasTextContext* Create(GrContext*, const SkSurfaceProps&); | 33 static GrAtlasTextContext* Create(GrContext*, const SkSurfaceProps&); |
| 35 | 34 |
| 36 private: | 35 private: |
| 37 GrAtlasTextContext(GrContext*, const SkSurfaceProps&); | 36 GrAtlasTextContext(GrContext*, const SkSurfaceProps&); |
| 38 ~GrAtlasTextContext() override {} | 37 ~GrAtlasTextContext() override {} |
| 39 | 38 |
| 40 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, | 39 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 void buildDistanceAdjustTable(); | 176 void buildDistanceAdjustTable(); |
| 178 | 177 |
| 179 SkScalar* fTable; | 178 SkScalar* fTable; |
| 180 }; | 179 }; |
| 181 | 180 |
| 182 GrBatchTextStrike* fCurrStrike; | 181 GrBatchTextStrike* fCurrStrike; |
| 183 GrTextBlobCache* fCache; | 182 GrTextBlobCache* fCache; |
| 184 SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable; | 183 SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable; |
| 185 | 184 |
| 186 friend class GrTextBlobCache; | 185 friend class GrTextBlobCache; |
| 187 friend class TextBatch; | 186 friend class GrAtlasTextBatch; |
| 188 | 187 |
| 189 #ifdef GR_TEST_UTILS | 188 #ifdef GR_TEST_UTILS |
| 190 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); | 189 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); |
| 191 #endif | 190 #endif |
| 192 | 191 |
| 193 typedef GrTextContext INHERITED; | 192 typedef GrTextContext INHERITED; |
| 194 }; | 193 }; |
| 195 | 194 |
| 196 #endif | 195 #endif |
| OLD | NEW |