Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 82d48160dce4ccf3227ca9e0f279cd18c6b2e723..6cd6dda322b943d65017af6be1f0243c4f2fa747 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -2055,12 +2055,10 @@ void SkCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, |
class SkDeviceFilteredPaint { |
public: |
SkDeviceFilteredPaint(SkBaseDevice* device, const SkPaint& paint) { |
- if (device->shouldDisableLCD(paint)) { |
- uint32_t flags = paint.getFlags(); |
- flags &= ~SkPaint::kLCDRenderText_Flag; |
- flags |= SkPaint::kGenA8FromLCD_Flag; |
+ uint32_t filteredFlags = device->filterTextFlags(paint); |
+ if (filteredFlags != paint.getFlags()) { |
SkPaint* newPaint = fLazy.set(paint); |
- newPaint->setFlags(flags); |
+ newPaint->setFlags(filteredFlags); |
fPaint = newPaint; |
} else { |
fPaint = &paint; |