| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
| 9 #include "SkConfig8888.h" | 9 #include "SkConfig8888.h" |
| 10 #include "SkDraw.h" | 10 #include "SkDraw.h" |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 // we're cool with the paint as is | 379 // we're cool with the paint as is |
| 380 return false; | 380 return false; |
| 381 } | 381 } |
| 382 | 382 |
| 383 if (kN32_SkColorType != fBitmap.colorType() || | 383 if (kN32_SkColorType != fBitmap.colorType() || |
| 384 paint.getRasterizer() || | 384 paint.getRasterizer() || |
| 385 paint.getPathEffect() || | 385 paint.getPathEffect() || |
| 386 paint.isFakeBoldText() || | 386 paint.isFakeBoldText() || |
| 387 paint.getStyle() != SkPaint::kFill_Style || | 387 paint.getStyle() != SkPaint::kFill_Style || |
| 388 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { | 388 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { |
| 389 // turn off lcd | 389 // turn off lcd, but turn on kGenA8 |
| 390 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; | 390 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
| 391 flags->fHinting = paint.getHinting(); | 391 flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; |
| 392 return true; | 392 return true; |
| 393 } | 393 } |
| 394 // we're cool with the paint as is | 394 // we're cool with the paint as is |
| 395 return false; | 395 return false; |
| 396 } | 396 } |
| OLD | NEW |