OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrStencilAndCoverTextContext_DEFINED | 8 #ifndef GrStencilAndCoverTextContext_DEFINED |
9 #define GrStencilAndCoverTextContext_DEFINED | 9 #define GrStencilAndCoverTextContext_DEFINED |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 private: | 33 private: |
34 GrStencilAndCoverTextContext(GrContext*, const SkSurfaceProps&); | 34 GrStencilAndCoverTextContext(GrContext*, const SkSurfaceProps&); |
35 | 35 |
36 bool canDraw(const SkPaint& skPaint, const SkMatrix&) override { | 36 bool canDraw(const SkPaint& skPaint, const SkMatrix&) override { |
37 return this->internalCanDraw(skPaint); | 37 return this->internalCanDraw(skPaint); |
38 } | 38 } |
39 | 39 |
40 bool internalCanDraw(const SkPaint&); | 40 bool internalCanDraw(const SkPaint&); |
41 | 41 |
42 void onDrawText(GrDrawContext*, GrRenderTarget*, const GrClip&, const GrPain
t&, const SkPaint&, | 42 void onDrawText(GrDrawContext*, const GrClip&, const GrPaint&, const SkPaint
&, |
43 const SkMatrix& viewMatrix, | 43 const SkMatrix& viewMatrix, |
44 const char text[], size_t byteLength, | 44 const char text[], size_t byteLength, |
45 SkScalar x, SkScalar y, const SkIRect& clipBounds) override; | 45 SkScalar x, SkScalar y, const SkIRect& clipBounds) override; |
46 void onDrawPosText(GrDrawContext*, GrRenderTarget*, | 46 void onDrawPosText(GrDrawContext*, |
47 const GrClip&, const GrPaint&, const SkPaint&, | 47 const GrClip&, const GrPaint&, const SkPaint&, |
48 const SkMatrix& viewMatrix, | 48 const SkMatrix& viewMatrix, |
49 const char text[], size_t byteLength, | 49 const char text[], size_t byteLength, |
50 const SkScalar pos[], int scalarsPerPosition, | 50 const SkScalar pos[], int scalarsPerPosition, |
51 const SkPoint& offset, const SkIRect& clipBounds) overrid
e; | 51 const SkPoint& offset, const SkIRect& clipBounds) overrid
e; |
52 void drawTextBlob(GrDrawContext*, GrRenderTarget*, const GrClip&, const SkPa
int&, | 52 void drawTextBlob(GrDrawContext*, const GrClip&, const SkPaint&, |
53 const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x,
SkScalar y, | 53 const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x,
SkScalar y, |
54 SkDrawFilter*, const SkIRect& clipBounds) override; | 54 SkDrawFilter*, const SkIRect& clipBounds) override; |
55 | 55 |
56 class FallbackBlobBuilder; | 56 class FallbackBlobBuilder; |
57 | 57 |
58 class TextRun { | 58 class TextRun { |
59 public: | 59 public: |
60 TextRun(const SkPaint& fontAndStroke); | 60 TextRun(const SkPaint& fontAndStroke); |
61 ~TextRun(); | 61 ~TextRun(); |
62 | 62 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache; | 134 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache; |
135 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache; | 135 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache; |
136 SkTInternalLList<TextBlob> fLRUList; | 136 SkTInternalLList<TextBlob> fLRUList; |
137 size_t fCacheSize; | 137 size_t fCacheSize; |
138 | 138 |
139 typedef GrTextContext INHERITED; | 139 typedef GrTextContext INHERITED; |
140 }; | 140 }; |
141 | 141 |
142 #endif | 142 #endif |
OLD | NEW |