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

Unified Diff: src/gpu/SkGpuDevice.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/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 06f6eb7778fd8dd925af8fc5683ab924ed4b0f92..ba3433fd0eb921a3e6cf5acb85a2197a8fe0aefd 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1722,26 +1722,18 @@ void SkGpuDevice::drawTextOnPath(const SkDraw& draw, const void* text,
///////////////////////////////////////////////////////////////////////////////
-bool SkGpuDevice::filterTextFlags(const SkPaint& paint, TextFlags* flags) {
- if (!paint.isLCDRenderText()) {
- // we're cool with the paint as is
- return false;
- }
-
+bool SkGpuDevice::onDisableLCD(const SkPaint& paint) const {
if (paint.getShader() ||
- paint.getXfermode() || // unless its srcover
+ !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode) ||
paint.getMaskFilter() ||
paint.getRasterizer() ||
paint.getColorFilter() ||
paint.getPathEffect() ||
paint.isFakeBoldText() ||
- paint.getStyle() != SkPaint::kFill_Style) {
- // turn off lcd, but turn on kGenA8
- flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag;
- flags->fFlags |= SkPaint::kGenA8FromLCD_Flag;
+ paint.getStyle() != SkPaint::kFill_Style)
+ {
return true;
}
- // we're cool with the paint as is
return false;
}
« src/gpu/SkGpuDevice.h ('K') | « src/gpu/SkGpuDevice.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698