| 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 #include "GrAtlasTextBlob.h" | 8 #include "GrAtlasTextBlob.h" |
| 9 | 9 |
| 10 #include "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 359 |
| 360 size_t textLen = it.glyphCount() * sizeof(uint16_t); | 360 size_t textLen = it.glyphCount() * sizeof(uint16_t); |
| 361 const SkPoint& offset = it.offset(); | 361 const SkPoint& offset = it.offset(); |
| 362 | 362 |
| 363 it.applyFontToPaint(&runPaint); | 363 it.applyFontToPaint(&runPaint); |
| 364 | 364 |
| 365 if (drawFilter && !drawFilter->filter(&runPaint, SkDrawFilter::kText_Type))
{ | 365 if (drawFilter && !drawFilter->filter(&runPaint, SkDrawFilter::kText_Type))
{ |
| 366 return; | 366 return; |
| 367 } | 367 } |
| 368 | 368 |
| 369 runPaint.setFlags(GrTextContext::FilterTextFlags(props, runPaint)); | 369 runPaint.setFlags(GrTextUtils::FilterTextFlags(props, runPaint)); |
| 370 | 370 |
| 371 switch (it.positioning()) { | 371 switch (it.positioning()) { |
| 372 case SkTextBlob::kDefault_Positioning: | 372 case SkTextBlob::kDefault_Positioning: |
| 373 GrTextUtils::DrawTextAsPath(context, dc, clip, runPaint, viewMatrix, | 373 GrTextUtils::DrawTextAsPath(context, dc, clip, runPaint, viewMatrix, |
| 374 (const char *)it.glyphs(), | 374 (const char *)it.glyphs(), |
| 375 textLen, x + offset.x(), y + offset.y(),
clipBounds); | 375 textLen, x + offset.x(), y + offset.y(),
clipBounds); |
| 376 break; | 376 break; |
| 377 case SkTextBlob::kHorizontal_Positioning: | 377 case SkTextBlob::kHorizontal_Positioning: |
| 378 GrTextUtils::DrawPosTextAsPath(context, dc, props, clip, runPaint, v
iewMatrix, | 378 GrTextUtils::DrawPosTextAsPath(context, dc, props, clip, runPaint, v
iewMatrix, |
| 379 (const char*)it.glyphs(), | 379 (const char*)it.glyphs(), |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 SkASSERT_RELEASE(lSubRun.vertexStartIndex() == rSubRun.vertexStartIn
dex()); | 533 SkASSERT_RELEASE(lSubRun.vertexStartIndex() == rSubRun.vertexStartIn
dex()); |
| 534 SkASSERT_RELEASE(lSubRun.vertexEndIndex() == rSubRun.vertexEndIndex(
)); | 534 SkASSERT_RELEASE(lSubRun.vertexEndIndex() == rSubRun.vertexEndIndex(
)); |
| 535 SkASSERT_RELEASE(lSubRun.glyphStartIndex() == rSubRun.glyphStartInde
x()); | 535 SkASSERT_RELEASE(lSubRun.glyphStartIndex() == rSubRun.glyphStartInde
x()); |
| 536 SkASSERT_RELEASE(lSubRun.glyphEndIndex() == rSubRun.glyphEndIndex())
; | 536 SkASSERT_RELEASE(lSubRun.glyphEndIndex() == rSubRun.glyphEndIndex())
; |
| 537 SkASSERT_RELEASE(lSubRun.maskFormat() == rSubRun.maskFormat()); | 537 SkASSERT_RELEASE(lSubRun.maskFormat() == rSubRun.maskFormat()); |
| 538 SkASSERT_RELEASE(lSubRun.drawAsDistanceFields() == rSubRun.drawAsDis
tanceFields()); | 538 SkASSERT_RELEASE(lSubRun.drawAsDistanceFields() == rSubRun.drawAsDis
tanceFields()); |
| 539 SkASSERT_RELEASE(lSubRun.hasUseLCDText() == rSubRun.hasUseLCDText())
; | 539 SkASSERT_RELEASE(lSubRun.hasUseLCDText() == rSubRun.hasUseLCDText())
; |
| 540 } | 540 } |
| 541 } | 541 } |
| 542 } | 542 } |
| OLD | NEW |