| 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 #include "GrStencilAndCoverTextContext.h" | 8 #include "GrStencilAndCoverTextContext.h" |
| 9 #include "GrAtlasTextContext.h" | 9 #include "GrAtlasTextContext.h" |
| 10 #include "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 INHERITED::drawTextBlob(dc, rt, clip, skPaint, viewMatrix, skBlob, x, y,
drawFilter, | 122 INHERITED::drawTextBlob(dc, rt, clip, skPaint, viewMatrix, skBlob, x, y,
drawFilter, |
| 123 clipBounds); | 123 clipBounds); |
| 124 return; | 124 return; |
| 125 } | 125 } |
| 126 | 126 |
| 127 if (fContext->abandoned()) { | 127 if (fContext->abandoned()) { |
| 128 return; | 128 return; |
| 129 } | 129 } |
| 130 | 130 |
| 131 GrPaint paint; | 131 GrPaint paint; |
| 132 if (!SkPaintToGrPaint(fContext, skPaint, viewMatrix, &paint)) { | 132 if (!SkPaintToGrPaint(fContext, skPaint, viewMatrix, &paint, NULL)) { |
| 133 return; | 133 return; |
| 134 } | 134 } |
| 135 | 135 |
| 136 const TextBlob& blob = this->findOrCreateTextBlob(skBlob, skPaint); | 136 const TextBlob& blob = this->findOrCreateTextBlob(skBlob, skPaint); |
| 137 GrPipelineBuilder pipelineBuilder(paint, rt, clip); | 137 GrPipelineBuilder pipelineBuilder(paint, rt, clip); |
| 138 | 138 |
| 139 TextBlob::Iter iter(blob); | 139 TextBlob::Iter iter(blob); |
| 140 for (TextRun* run = iter.get(); run; run = iter.next()) { | 140 for (TextRun* run = iter.get(); run; run = iter.next()) { |
| 141 run->draw(fContext, dc, &pipelineBuilder, paint.getColor(), viewMatrix,
x, y, clipBounds, | 141 run->draw(fContext, dc, &pipelineBuilder, paint.getColor(), viewMatrix,
x, y, clipBounds, |
| 142 fFallbackTextContext, skPaint); | 142 fFallbackTextContext, skPaint); |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 fBuffIdx = 0; | 601 fBuffIdx = 0; |
| 602 } | 602 } |
| 603 | 603 |
| 604 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfInit
ialized() { | 604 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfInit
ialized() { |
| 605 if (!this->isInitialized()) { | 605 if (!this->isInitialized()) { |
| 606 return nullptr; | 606 return nullptr; |
| 607 } | 607 } |
| 608 this->flush(); | 608 this->flush(); |
| 609 return fBuilder->build(); | 609 return fBuilder->build(); |
| 610 } | 610 } |
| OLD | NEW |