Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "GrDistanceFieldTextContext.h" | 8 #include "GrDistanceFieldTextContext.h" |
| 9 #include "GrAtlas.h" | 9 #include "GrAtlas.h" |
| 10 #include "GrDrawTarget.h" | 10 #include "GrDrawTarget.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 fCurrVertex = 0; | 301 fCurrVertex = 0; |
| 302 | 302 |
| 303 fVertices = NULL; | 303 fVertices = NULL; |
| 304 fMaxVertices = 0; | 304 fMaxVertices = 0; |
| 305 | 305 |
| 306 fTextRatio = fSkPaint.getTextSize()/kBaseDFFontSize; | 306 fTextRatio = fSkPaint.getTextSize()/kBaseDFFontSize; |
| 307 | 307 |
| 308 fSkPaint.setTextSize(SkIntToScalar(kBaseDFFontSize)); | 308 fSkPaint.setTextSize(SkIntToScalar(kBaseDFFontSize)); |
| 309 fSkPaint.setLCDRenderText(false); | 309 fSkPaint.setLCDRenderText(false); |
| 310 fSkPaint.setAutohinted(false); | 310 fSkPaint.setAutohinted(false); |
| 311 fSkPaint.setSubpixelText(false); | 311 fSkPaint.setSubpixelText(true); |
| 312 fSkPaint.setLinearText(true); | |
|
reed1
2014/03/14 18:32:50
This field is of questionable meaning :) Did you n
jvanverth1
2014/03/14 18:46:02
Purely speculative. It's gone.
| |
| 312 } | 313 } |
| 313 | 314 |
| 314 inline void GrDistanceFieldTextContext::finish() { | 315 inline void GrDistanceFieldTextContext::finish() { |
| 315 flushGlyphs(); | 316 flushGlyphs(); |
| 316 | 317 |
| 317 GrTextContext::finish(); | 318 GrTextContext::finish(); |
| 318 } | 319 } |
| 319 | 320 |
| 320 void GrDistanceFieldTextContext::drawText(const GrPaint& paint, const SkPaint& s kPaint, | 321 void GrDistanceFieldTextContext::drawText(const GrPaint& paint, const SkPaint& s kPaint, |
| 321 const char text[], size_t byteLength, | 322 const char text[], size_t byteLength, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 449 SkScalarToFixed(y) - (glyph.fAdvanceY >> a lignShift) | 450 SkScalarToFixed(y) - (glyph.fAdvanceY >> a lignShift) |
| 450 + SK_FixedHalf, //d1g.fHalfSampleY, | 451 + SK_FixedHalf, //d1g.fHalfSampleY, |
| 451 fontScaler); | 452 fontScaler); |
| 452 } | 453 } |
| 453 pos += scalarsPerPosition; | 454 pos += scalarsPerPosition; |
| 454 } | 455 } |
| 455 } | 456 } |
| 456 | 457 |
| 457 this->finish(); | 458 this->finish(); |
| 458 } | 459 } |
| OLD | NEW |