diff --git a/src/core/SkRasterPipeline.cpp b/src/core/SkRasterPipeline.cpp index f2e85dcb9a..4c01e60cb8 100644 --- a/src/core/SkRasterPipeline.cpp +++ b/src/core/SkRasterPipeline.cpp @@ -244,7 +244,7 @@ void SkRasterPipeline::append_store(SkColorType ct, const SkRasterPipeline_Memor this->append(store_1010102, ctx); break; - case kGray_8_SkColorType: this->append(luminance_to_alpha); + case kGray_8_SkColorType: this->append(bt709_luminance_or_luma_to_alpha); this->append(store_a8, ctx); break; diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h index 8a871fb66b..55df06c955 100644 --- a/src/core/SkRasterPipeline.h +++ b/src/core/SkRasterPipeline.h @@ -56,7 +56,7 @@ M(load_rg1616) M(store_rg1616) \ M(load_16161616) M(store_16161616) \ M(load_1010102) M(load_1010102_dst) M(store_1010102) M(gather_1010102) \ - M(alpha_to_gray) M(alpha_to_gray_dst) M(luminance_to_alpha) \ + M(alpha_to_gray) M(alpha_to_gray_dst) M(bt709_luminance_or_luma_to_alpha) \ M(bilerp_clamp_8888) \ M(store_u16_be) \ M(load_src) M(store_src) M(load_dst) M(store_dst) \ diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp index e66fb9e6e8..0e6deb08e5 100644 --- a/src/effects/SkLumaColorFilter.cpp +++ b/src/effects/SkLumaColorFilter.cpp @@ -19,7 +19,7 @@ #endif bool SkLumaColorFilter::onAppendStages(const SkStageRec& rec, bool shaderIsOpaque) const { - rec.fPipeline->append(SkRasterPipeline::luminance_to_alpha); + rec.fPipeline->append(SkRasterPipeline::bt709_luminance_or_luma_to_alpha); rec.fPipeline->append(SkRasterPipeline::clamp_0); rec.fPipeline->append(SkRasterPipeline::clamp_1); return true; diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h index e05f36c675..b090618deb 100644 --- a/src/opts/SkRasterPipeline_opts.h +++ b/src/opts/SkRasterPipeline_opts.h @@ -2224,7 +2224,7 @@ STAGE(alpha_to_gray_dst, Ctx::None) { dr = dg = db = da; da = 1; } -STAGE(luminance_to_alpha, Ctx::None) { +STAGE(bt709_luminance_or_luma_to_alpha, Ctx::None) { a = r*0.2126f + g*0.7152f + b*0.0722f; r = g = b = 0; } @@ -3507,7 +3507,7 @@ STAGE_PP(alpha_to_gray_dst, Ctx::None) { dr = dg = db = da; da = 255; } -STAGE_PP(luminance_to_alpha, Ctx::None) { +STAGE_PP(bt709_luminance_or_luma_to_alpha, Ctx::None) { a = (r*54 + g*183 + b*19)/256; // 0.2126, 0.7152, 0.0722 with 256 denominator. r = g = b = 0; }