| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 class TextRun { | 71 class TextRun { |
| 72 public: | 72 public: |
| 73 TextRun(const SkPaint& fontAndStroke); | 73 TextRun(const SkPaint& fontAndStroke); |
| 74 ~TextRun(); | 74 ~TextRun(); |
| 75 | 75 |
| 76 void setText(const char text[], size_t byteLength, SkScalar x, SkScalar
y); | 76 void setText(const char text[], size_t byteLength, SkScalar x, SkScalar
y); |
| 77 | 77 |
| 78 void setPosText(const char text[], size_t byteLength, const SkScalar pos
[], | 78 void setPosText(const char text[], size_t byteLength, const SkScalar pos
[], |
| 79 int scalarsPerPosition, const SkPoint& offset); | 79 int scalarsPerPosition, const SkPoint& offset); |
| 80 | 80 |
| 81 void draw(GrContext*, GrDrawContext*, GrPipelineBuilder*, GrColor, const
SkMatrix&, | 81 void draw(GrContext*, GrDrawContext*, GrPipelineBuilder*, const GrClip&,
GrColor, |
| 82 const SkSurfaceProps&, | 82 const SkMatrix&, const SkSurfaceProps&, |
| 83 SkScalar x, SkScalar y, const SkIRect& clipBounds, | 83 SkScalar x, SkScalar y, const SkIRect& clipBounds, |
| 84 GrAtlasTextContext* fallbackTextContext, const SkPaint& origin
alSkPaint) const; | 84 GrAtlasTextContext* fallbackTextContext, const SkPaint& origin
alSkPaint) const; |
| 85 | 85 |
| 86 void releaseGlyphCache() const; | 86 void releaseGlyphCache() const; |
| 87 | 87 |
| 88 size_t computeSizeInCache() const; | 88 size_t computeSizeInCache() const; |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 typedef GrDrawPathRangeBatch::InstanceData InstanceData; | 91 typedef GrDrawPathRangeBatch::InstanceData InstanceData; |
| 92 | 92 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 void purgeToFit(const TextBlob&); | 148 void purgeToFit(const TextBlob&); |
| 149 | 149 |
| 150 GrAtlasTextContext* fFallbackTextConte
xt; | 150 GrAtlasTextContext* fFallbackTextConte
xt; |
| 151 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache; | 151 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache; |
| 152 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache; | 152 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache; |
| 153 SkTInternalLList<TextBlob> fLRUList; | 153 SkTInternalLList<TextBlob> fLRUList; |
| 154 size_t fCacheSize; | 154 size_t fCacheSize; |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 #endif | 157 #endif |
| OLD | NEW |