| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 } | 454 } |
| 455 | 455 |
| 456 /////////////////////////////////////////////////////////////////////////////// | 456 /////////////////////////////////////////////////////////////////////////////// |
| 457 | 457 |
| 458 bool SkBitmapDevice::filterTextFlags(const SkPaint& paint, TextFlags* flags) { | 458 bool SkBitmapDevice::filterTextFlags(const SkPaint& paint, TextFlags* flags) { |
| 459 if (!paint.isLCDRenderText() || !paint.isAntiAlias()) { | 459 if (!paint.isLCDRenderText() || !paint.isAntiAlias()) { |
| 460 // we're cool with the paint as is | 460 // we're cool with the paint as is |
| 461 return false; | 461 return false; |
| 462 } | 462 } |
| 463 | 463 |
| 464 if (SkBitmap::kARGB_8888_Config != fBitmap.config() || | 464 if (kN32_SkColorType != fBitmap.colorType() || |
| 465 paint.getRasterizer() || | 465 paint.getRasterizer() || |
| 466 paint.getPathEffect() || | 466 paint.getPathEffect() || |
| 467 paint.isFakeBoldText() || | 467 paint.isFakeBoldText() || |
| 468 paint.getStyle() != SkPaint::kFill_Style || | 468 paint.getStyle() != SkPaint::kFill_Style || |
| 469 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { | 469 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { |
| 470 // turn off lcd | 470 // turn off lcd |
| 471 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; | 471 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
| 472 flags->fHinting = paint.getHinting(); | 472 flags->fHinting = paint.getHinting(); |
| 473 return true; | 473 return true; |
| 474 } | 474 } |
| 475 // we're cool with the paint as is | 475 // we're cool with the paint as is |
| 476 return false; | 476 return false; |
| 477 } | 477 } |
| OLD | NEW |