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 15 matching lines...) Expand all Loading... |
26 */ | 26 */ |
27 class GrStencilAndCoverTextContext : public GrTextContext { | 27 class GrStencilAndCoverTextContext : public GrTextContext { |
28 public: | 28 public: |
29 static GrStencilAndCoverTextContext* Create(GrContext*, const SkSurfaceProps
&); | 29 static GrStencilAndCoverTextContext* Create(GrContext*, const SkSurfaceProps
&); |
30 | 30 |
31 virtual ~GrStencilAndCoverTextContext(); | 31 virtual ~GrStencilAndCoverTextContext(); |
32 | 32 |
33 private: | 33 private: |
34 GrStencilAndCoverTextContext(GrContext*, const SkSurfaceProps&); | 34 GrStencilAndCoverTextContext(GrContext*, const SkSurfaceProps&); |
35 | 35 |
36 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, const SkP
aint& skPaint, | 36 bool canDraw(const SkPaint& skPaint, const SkMatrix&) override { |
37 const SkMatrix&) override { return this->internalCanDraw(skPain
t); } | 37 return this->internalCanDraw(skPaint); |
| 38 } |
38 | 39 |
39 bool internalCanDraw(const SkPaint&); | 40 bool internalCanDraw(const SkPaint&); |
40 | 41 |
41 void onDrawText(GrDrawContext*, GrRenderTarget*, const GrClip&, const GrPain
t&, const SkPaint&, | 42 void onDrawText(GrDrawContext*, GrRenderTarget*, const GrClip&, const GrPain
t&, const SkPaint&, |
42 const SkMatrix& viewMatrix, | 43 const SkMatrix& viewMatrix, |
43 const char text[], size_t byteLength, | 44 const char text[], size_t byteLength, |
44 SkScalar x, SkScalar y, const SkIRect& clipBounds) override; | 45 SkScalar x, SkScalar y, const SkIRect& clipBounds) override; |
45 void onDrawPosText(GrDrawContext*, GrRenderTarget*, | 46 void onDrawPosText(GrDrawContext*, GrRenderTarget*, |
46 const GrClip&, const GrPaint&, const SkPaint&, | 47 const GrClip&, const GrPaint&, const SkPaint&, |
47 const SkMatrix& viewMatrix, | 48 const SkMatrix& viewMatrix, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 133 |
133 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache; | 134 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache; |
134 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache; | 135 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache; |
135 SkTInternalLList<TextBlob> fLRUList; | 136 SkTInternalLList<TextBlob> fLRUList; |
136 size_t fCacheSize; | 137 size_t fCacheSize; |
137 | 138 |
138 typedef GrTextContext INHERITED; | 139 typedef GrTextContext INHERITED; |
139 }; | 140 }; |
140 | 141 |
141 #endif | 142 #endif |
OLD | NEW |