| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 } | 291 } |
| 292 | 292 |
| 293 // sets the last subrun of runIndex to use distance field text | 293 // sets the last subrun of runIndex to use distance field text |
| 294 void setSubRunHasDistanceFields(int runIndex, bool hasLCD) { | 294 void setSubRunHasDistanceFields(int runIndex, bool hasLCD) { |
| 295 Run& run = fRuns[runIndex]; | 295 Run& run = fRuns[runIndex]; |
| 296 Run::SubRunInfo& subRun = run.fSubRunInfo.back(); | 296 Run::SubRunInfo& subRun = run.fSubRunInfo.back(); |
| 297 subRun.setUseLCDText(hasLCD); | 297 subRun.setUseLCDText(hasLCD); |
| 298 subRun.setDrawAsDistanceFields(); | 298 subRun.setDrawAsDistanceFields(); |
| 299 } | 299 } |
| 300 | 300 |
| 301 // inits the override descriptor on the current run. All following subruns
must use this |
| 302 // descriptor |
| 303 void initOverride(int runIndex) { |
| 304 Run& run = fRuns[runIndex]; |
| 305 // Push back a new subrun to fill and set the override descriptor |
| 306 run.push_back(); |
| 307 run.fOverrideDescriptor.reset(new SkAutoDescriptor); |
| 308 } |
| 309 |
| 301 SkGlyphCache* setupCache(int runIndex, | 310 SkGlyphCache* setupCache(int runIndex, |
| 302 const SkSurfaceProps& props, | 311 const SkSurfaceProps& props, |
| 303 const SkPaint& skPaint, | 312 const SkPaint& skPaint, |
| 304 const SkMatrix* viewMatrix, | 313 const SkMatrix* viewMatrix, |
| 305 bool noGamma); | 314 bool noGamma); |
| 306 | 315 |
| 307 // Appends a glyph to the blob. If the glyph is too large, the glyph will b
e appended | 316 // Appends a glyph to the blob. If the glyph is too large, the glyph will b
e appended |
| 308 // as a path. | 317 // as a path. |
| 309 void appendGlyph(int runIndex, | 318 void appendGlyph(int runIndex, |
| 310 const SkRect& positions, | 319 const SkRect& positions, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 void flushRunAsPaths(GrContext* context, | 402 void flushRunAsPaths(GrContext* context, |
| 394 GrDrawContext* dc, | 403 GrDrawContext* dc, |
| 395 const SkSurfaceProps& props, | 404 const SkSurfaceProps& props, |
| 396 const SkTextBlobRunIterator& it, | 405 const SkTextBlobRunIterator& it, |
| 397 const GrClip& clip, const SkPaint& skPaint, | 406 const GrClip& clip, const SkPaint& skPaint, |
| 398 SkDrawFilter* drawFilter, const SkMatrix& viewMatrix, | 407 SkDrawFilter* drawFilter, const SkMatrix& viewMatrix, |
| 399 const SkIRect& clipBounds, SkScalar x, SkScalar y); | 408 const SkIRect& clipBounds, SkScalar x, SkScalar y); |
| 400 }; | 409 }; |
| 401 | 410 |
| 402 #endif | 411 #endif |
| OLD | NEW |