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

Unified Diff: src/core/SkPaint.cpp

Issue 1076593002: Start canonicalizing color for all A8 textblobs (Closed) Base URL: https://skia.googlesource.com/skia.git@atcachemasks
Patch Set: nits Created 5 years, 8 months 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
« no previous file with comments | « include/core/SkTextBlob.h ('k') | src/core/SkTextBlob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 2c1745d00b490f03837f35481a9c08926975e15c..9f76355aac8ecd73153578653df755482f40647a 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1291,9 +1291,9 @@ static bool justAColor(const SkPaint& paint, SkColor* color) {
return true;
}
-static SkColor computeLuminanceColor(const SkPaint& paint) {
+SkColor SkPaint::computeLuminanceColor() const {
SkColor c;
- if (!justAColor(paint, &c)) {
+ if (!justAColor(*this, &c)) {
c = SkColorSetRGB(0x7F, 0x80, 0x7F);
}
return c;
@@ -1463,7 +1463,7 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
// these modify fFlags, so do them after assigning fFlags
rec->setHinting(computeHinting(paint));
- rec->setLuminanceColor(computeLuminanceColor(paint));
+ rec->setLuminanceColor(paint.computeLuminanceColor());
if (NULL == deviceProperties) {
rec->setDeviceGamma(SK_GAMMA_EXPONENT);
« no previous file with comments | « include/core/SkTextBlob.h ('k') | src/core/SkTextBlob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698