Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/core/SkBitmapDevice.cpp

Issue 719253002: rename filterTextFlags to disableLCD (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698