diff options
author | reed <reed@google.com> | 2014-09-16 12:27:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 12:27:55 -0700 |
commit | 3375c8047e7f10e6bf9a2ce1c2e8b0df08c56024 (patch) | |
tree | 1700a3011bd609708deee59218cfe2b0d63f63cf /src | |
parent | 1e78fc4ed2a1ef9f049311696ebd0a26e1c3782d (diff) |
when we disable lcd for impl reasons, add kGenA8 to document the original intent
BUG=skia:
R=bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/572933004
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 4 | ||||
-rw-r--r-- | src/core/SkCanvas.cpp | 1 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 2711004aef..3af47f6e96 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -386,9 +386,9 @@ bool SkBitmapDevice::filterTextFlags(const SkPaint& paint, TextFlags* flags) { paint.isFakeBoldText() || paint.getStyle() != SkPaint::kFill_Style || !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { - // turn off lcd + // turn off lcd, but turn on kGenA8 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; - flags->fHinting = paint.getHinting(); + flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; return true; } // we're cool with the paint as is diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 62d60da178..6beb26e4ca 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1993,7 +1993,6 @@ public: if (device->filterTextFlags(paint, &flags)) { SkPaint* newPaint = fLazy.set(paint); newPaint->setFlags(flags.fFlags); - newPaint->setHinting(flags.fHinting); fPaint = newPaint; } else { fPaint = &paint; diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index b719f84278..0ec2b858c4 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -1765,9 +1765,9 @@ bool SkGpuDevice::filterTextFlags(const SkPaint& paint, TextFlags* flags) { paint.getPathEffect() || paint.isFakeBoldText() || paint.getStyle() != SkPaint::kFill_Style) { - // turn off lcd + // turn off lcd, but turn on kGenA8 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; - flags->fHinting = paint.getHinting(); + flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; return true; } // we're cool with the paint as is |