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 GrAtlasTextBlob_DEFINED | 8 #ifndef GrAtlasTextBlob_DEFINED |
9 #define GrAtlasTextBlob_DEFINED | 9 #define GrAtlasTextBlob_DEFINED |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 283 |
284 void push_back_run(int currRun) { | 284 void push_back_run(int currRun) { |
285 SkASSERT(currRun < fRunCount); | 285 SkASSERT(currRun < fRunCount); |
286 if (currRun > 0) { | 286 if (currRun > 0) { |
287 Run::SubRunInfo& newRun = fRuns[currRun].fSubRunInfo.back(); | 287 Run::SubRunInfo& newRun = fRuns[currRun].fSubRunInfo.back(); |
288 Run::SubRunInfo& lastRun = fRuns[currRun - 1].fSubRunInfo.back(); | 288 Run::SubRunInfo& lastRun = fRuns[currRun - 1].fSubRunInfo.back(); |
289 newRun.setAsSuccessor(lastRun); | 289 newRun.setAsSuccessor(lastRun); |
290 } | 290 } |
291 } | 291 } |
292 | 292 |
| 293 // sets the last subrun of runIndex to use distance field text |
| 294 void setSubRunHasDistanceFields(int runIndex, bool hasLCD) { |
| 295 Run& run = fRuns[runIndex]; |
| 296 Run::SubRunInfo& subRun = run.fSubRunInfo.back(); |
| 297 subRun.setUseLCDText(hasLCD); |
| 298 subRun.setDrawAsDistanceFields(); |
| 299 } |
| 300 |
293 SkGlyphCache* setupCache(int runIndex, | 301 SkGlyphCache* setupCache(int runIndex, |
294 const SkSurfaceProps& props, | 302 const SkSurfaceProps& props, |
295 const SkPaint& skPaint, | 303 const SkPaint& skPaint, |
296 const SkMatrix* viewMatrix, | 304 const SkMatrix* viewMatrix, |
297 bool noGamma); | 305 bool noGamma); |
298 | 306 |
299 // Appends a glyph to the blob. If the glyph is too large, the glyph will b
e appended | 307 // Appends a glyph to the blob. If the glyph is too large, the glyph will b
e appended |
300 // as a path. | 308 // as a path. |
301 void appendGlyph(int runIndex, | 309 void appendGlyph(int runIndex, |
302 const SkRect& positions, | 310 const SkRect& positions, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 void flushRunAsPaths(GrContext* context, | 393 void flushRunAsPaths(GrContext* context, |
386 GrDrawContext* dc, | 394 GrDrawContext* dc, |
387 const SkSurfaceProps& props, | 395 const SkSurfaceProps& props, |
388 const SkTextBlobRunIterator& it, | 396 const SkTextBlobRunIterator& it, |
389 const GrClip& clip, const SkPaint& skPaint, | 397 const GrClip& clip, const SkPaint& skPaint, |
390 SkDrawFilter* drawFilter, const SkMatrix& viewMatrix, | 398 SkDrawFilter* drawFilter, const SkMatrix& viewMatrix, |
391 const SkIRect& clipBounds, SkScalar x, SkScalar y); | 399 const SkIRect& clipBounds, SkScalar x, SkScalar y); |
392 }; | 400 }; |
393 | 401 |
394 #endif | 402 #endif |
OLD | NEW |