clarify that there's no kMedium here

Reword to make it clearer we're only handling kNone, kLow, and kHigh;
kMedium has been transformed into kLow or kHigh already at this point.

I think it's particularly easy to be confused by the line

    if (quality > kLow_SkFilterQuality) { ... }

Change-Id: If78cb6e946e26d08f5acd807d32e0446c69061b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261765
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2019-12-30 14:21:35 -06:00 committed by Skia Commit-Bot
parent 4311f19158
commit 60b69ecc8d

View File

@ -499,7 +499,7 @@ bool SkImageShader::doStages(const SkStageRec& rec, SkImageStageUpdater* updater
bool src_is_normalized = SkColorTypeIsNormalized(info.colorType());
// Bicubic filtering naturally produces out of range values on both sides of [0,1].
if (quality > kLow_SkFilterQuality) {
if (quality == kHigh_SkFilterQuality) {
p->append(SkRasterPipeline::clamp_0);
p->append(fClampAsIfUnpremul ? SkRasterPipeline::clamp_1
: SkRasterPipeline::clamp_a);
@ -597,6 +597,7 @@ bool SkImageShader::doStages(const SkStageRec& rec, SkImageStageUpdater* updater
p->append(SkRasterPipeline::move_dst_src);
} else {
SkASSERT(quality == kHigh_SkFilterQuality);
p->append(SkRasterPipeline::save_xy, sampler);
sample(SkRasterPipeline::bicubic_n3x, SkRasterPipeline::bicubic_n3y);