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 #include "GrAtlasTextContext.h" | 7 #include "GrAtlasTextContext.h" |
8 | 8 |
9 #include "GrBatch.h" | 9 #include "GrBatch.h" |
10 #include "GrBatchFontCache.h" | 10 #include "GrBatchFontCache.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } | 440 } |
441 | 441 |
442 if (!fEnableDFRendering && !skPaint.isDistanceFieldTextTEMP() && | 442 if (!fEnableDFRendering && !skPaint.isDistanceFieldTextTEMP() && |
443 scaledTextSize < kLargeDFFontSize) { | 443 scaledTextSize < kLargeDFFontSize) { |
444 return false; | 444 return false; |
445 } | 445 } |
446 | 446 |
447 // rasterizers and mask filters modify alpha, which doesn't | 447 // rasterizers and mask filters modify alpha, which doesn't |
448 // translate well to distance | 448 // translate well to distance |
449 if (skPaint.getRasterizer() || skPaint.getMaskFilter() || | 449 if (skPaint.getRasterizer() || skPaint.getMaskFilter() || |
450 !fContext->getTextTarget()->caps()->shaderDerivativeSupport()) { | 450 !fContext->getTextTarget()->caps()->shaderCaps()->shaderDerivativeSuppor
t()) { |
451 return false; | 451 return false; |
452 } | 452 } |
453 | 453 |
454 // TODO: add some stroking support | 454 // TODO: add some stroking support |
455 if (skPaint.getStyle() != SkPaint::kFill_Style) { | 455 if (skPaint.getStyle() != SkPaint::kFill_Style) { |
456 return false; | 456 return false; |
457 } | 457 } |
458 | 458 |
459 return true; | 459 return true; |
460 } | 460 } |
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2156 pipelineBuilder.setFromPaint(grPaint, rt, clip); | 2156 pipelineBuilder.setFromPaint(grPaint, rt, clip); |
2157 | 2157 |
2158 GrColor color = grPaint.getColor(); | 2158 GrColor color = grPaint.getColor(); |
2159 for (int run = 0; run < cacheBlob->fRunCount; run++) { | 2159 for (int run = 0; run < cacheBlob->fRunCount; run++) { |
2160 this->flushRun(target, &pipelineBuilder, cacheBlob, run, color, 0, 0, sk
Paint); | 2160 this->flushRun(target, &pipelineBuilder, cacheBlob, run, color, 0, 0, sk
Paint); |
2161 } | 2161 } |
2162 | 2162 |
2163 // Now flush big glyphs | 2163 // Now flush big glyphs |
2164 this->flushBigGlyphs(cacheBlob, rt, grPaint, clip, 0, 0); | 2164 this->flushBigGlyphs(cacheBlob, rt, grPaint, clip, 0, 0); |
2165 } | 2165 } |
OLD | NEW |