diff options
Diffstat (limited to 'src/gpu/text/GrTextUtils.cpp')
-rw-r--r-- | src/gpu/text/GrTextUtils.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/gpu/text/GrTextUtils.cpp b/src/gpu/text/GrTextUtils.cpp index 7d693d1e29..738cfb68be 100644 --- a/src/gpu/text/GrTextUtils.cpp +++ b/src/gpu/text/GrTextUtils.cpp @@ -52,30 +52,9 @@ bool GrTextUtils::RunPaint::modifyForRun(std::function<void(SkPaint*)> paintModF // The draw filter could have changed either the paint color or color filter. this->initFilteredColor(); } - fModifiedPaint.get()->setFlags(FilterTextFlags(fProps, *fModifiedPaint.get())); return true; } -uint32_t GrTextUtils::FilterTextFlags(const SkSurfaceProps& surfaceProps, const SkPaint& paint) { - uint32_t flags = paint.getFlags(); - - if (!paint.isLCDRenderText() || !paint.isAntiAlias()) { - return flags; - } - - if (kUnknown_SkPixelGeometry == surfaceProps.pixelGeometry() || ShouldDisableLCD(paint)) { - flags &= ~SkPaint::kLCDRenderText_Flag; - flags |= SkPaint::kGenA8FromLCD_Flag; - } - - return flags; -} - -bool GrTextUtils::ShouldDisableLCD(const SkPaint& paint) { - return paint.getMaskFilter() || paint.getPathEffect() || - paint.isFakeBoldText() || paint.getStyle() != SkPaint::kFill_Style; -} - bool GrTextUtils::PathTextIter::next(const SkGlyph** skGlyph, const SkPath** path, SkScalar* xpos) { SkASSERT(skGlyph); SkASSERT(path); |