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 17 matching lines...) Expand all Loading... |
28 class GrDrawTarget; | 28 class GrDrawTarget; |
29 class GrPipelineBuilder; | 29 class GrPipelineBuilder; |
30 class GrTextBlobCache; | 30 class GrTextBlobCache; |
31 | 31 |
32 /* | 32 /* |
33 * This class implements GrTextContext using standard bitmap fonts, and can also
process textblobs. | 33 * This class implements GrTextContext using standard bitmap fonts, and can also
process textblobs. |
34 * TODO replace GrBitmapTextContext | 34 * TODO replace GrBitmapTextContext |
35 */ | 35 */ |
36 class GrAtlasTextContext : public GrTextContext { | 36 class GrAtlasTextContext : public GrTextContext { |
37 public: | 37 public: |
38 static GrAtlasTextContext* Create(GrContext*, GrDrawContext*, const SkDevice
Properties&); | 38 static GrAtlasTextContext* Create(GrContext*, GrDrawContext*, const SkSurfac
eProps&); |
39 | 39 |
40 private: | 40 private: |
41 GrAtlasTextContext(GrContext*, GrDrawContext*, const SkDeviceProperties&); | 41 GrAtlasTextContext(GrContext*, GrDrawContext*, const SkSurfaceProps&); |
42 ~GrAtlasTextContext() override {} | 42 ~GrAtlasTextContext() override {} |
43 | 43 |
44 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, | 44 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, |
45 const SkPaint&, const SkMatrix& viewMatrix) override; | 45 const SkPaint&, const SkMatrix& viewMatrix) override; |
46 | 46 |
47 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, | 47 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain
t&, |
48 const SkMatrix& viewMatrix, const char text[], size_t byteLe
ngth, | 48 const SkMatrix& viewMatrix, const char text[], size_t byteLe
ngth, |
49 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove
rride; | 49 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove
rride; |
50 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, | 50 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, |
51 const SkPaint&, const SkMatrix& viewMatrix, | 51 const SkPaint&, const SkMatrix& viewMatrix, |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 friend class BitmapTextBatch; | 387 friend class BitmapTextBatch; |
388 | 388 |
389 #ifdef GR_TEST_UTILS | 389 #ifdef GR_TEST_UTILS |
390 BATCH_TEST_FRIEND(TextBlobBatch); | 390 BATCH_TEST_FRIEND(TextBlobBatch); |
391 #endif | 391 #endif |
392 | 392 |
393 typedef GrTextContext INHERITED; | 393 typedef GrTextContext INHERITED; |
394 }; | 394 }; |
395 | 395 |
396 #endif | 396 #endif |
OLD | NEW |