aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrTextUtils.h
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-06-08 11:14:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-08 15:49:20 +0000
commitbc2cdd154bf5a031ca9d3a530123d9f7a4c0925d (patch)
treef346ec9baf75db146109e35330f89dd15086471c /src/gpu/text/GrTextUtils.h
parente03a72917e5ce7ab8f19260c627e00a7fe0ceefd (diff)
Fix LCD distance field text color filtering
Distance field text was applying the color filter to determine any gamma adjustments, but not any effects of the shader as well. Bug: skia:6669 Change-Id: I73384f68141fb523ea2058e00d0a9fbb2fbc622b Reviewed-on: https://skia-review.googlesource.com/19049 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/text/GrTextUtils.h')
-rw-r--r--src/gpu/text/GrTextUtils.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gpu/text/GrTextUtils.h b/src/gpu/text/GrTextUtils.h
index 9f38699010..bbf3ca49a9 100644
--- a/src/gpu/text/GrTextUtils.h
+++ b/src/gpu/text/GrTextUtils.h
@@ -59,7 +59,7 @@ public:
// These expose the paint's color run through its color filter (if any). This is only valid
// when drawing grayscale/lcd glyph masks and not when drawing color glyphs.
GrColor filteredPremulColor() const { return fFilteredPremulColor; }
- GrColor filteredUnpremulColor() const { return fFilteredUnpremulColor; }
+ SkColor luminanceColor() const { return fPaint->computeLuminanceColor(); }
const SkPaint& skPaint() const { return *fPaint; }
operator const SkPaint&() const { return this->skPaint(); }
@@ -80,7 +80,6 @@ public:
// This is the paint's color run through its color filter, if present. This color should
// be used except when rendering bitmap text, in which case the bitmap must be filtered in
// the fragment shader.
- GrColor fFilteredUnpremulColor;
GrColor fFilteredPremulColor;
};
@@ -98,7 +97,6 @@ public:
fDstColorSpace = fOriginalPaint->dstColorSpace();
fColorXformFromSRGB = fOriginalPaint->colorXformFromSRGB();
fFilteredPremulColor = fOriginalPaint->filteredPremulColor();
- fFilteredUnpremulColor = fOriginalPaint->filteredUnpremulColor();
}
bool modifyForRun(const SkTextBlobRunIterator&);