Chromium Code Reviews| Index: src/core/SkBitmapDevice.cpp |
| diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp |
| index cc4155a29f44c6fd76129cf738ffa195efc0cb6b..5e3c7e7f8ae815309302fa51014c502d5d51d1a0 100644 |
| --- a/src/core/SkBitmapDevice.cpp |
| +++ b/src/core/SkBitmapDevice.cpp |
| @@ -383,23 +383,15 @@ SkImageFilter::Cache* SkBitmapDevice::getImageFilterCache() { |
| /////////////////////////////////////////////////////////////////////////////// |
| -bool SkBitmapDevice::filterTextFlags(const SkPaint& paint, TextFlags* flags) { |
| - if (!paint.isLCDRenderText() || !paint.isAntiAlias()) { |
| - // we're cool with the paint as is |
| - return false; |
| - } |
| - |
| +bool SkBitmapDevice::onDisableLCD(const SkPaint& paint) const { |
| if (kN32_SkColorType != fBitmap.colorType() || |
| paint.getRasterizer() || |
| paint.getPathEffect() || |
| paint.isFakeBoldText() || |
| paint.getStyle() != SkPaint::kFill_Style || |
| - !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { |
| - // turn off lcd, but turn on kGenA8 |
| - flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
| - flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; |
| + !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) |
| + { |
| return true; |
|
f(malita)
2014/11/12 20:49:14
Maybe inline the condition in a single return stat
|
| } |
| - // we're cool with the paint as is |
| return false; |
| } |