Rename GrFragmentProcessor::MulOutputByInputUnpremulColor to MakeInputPremulAndMulByOutput.
Change-Id: I33d74ddb8a7836e8f1922a5ae73f0adb74d59db3 Reviewed-on: https://skia-review.googlesource.com/7609 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
0a84a343fd
commit
22af73f2a5
@ -35,11 +35,12 @@ public:
|
||||
static sk_sp<GrFragmentProcessor> MulOutputByInputAlpha(sk_sp<GrFragmentProcessor>);
|
||||
|
||||
/**
|
||||
* Similar to the above but it modulates the output r,g,b of the child processor by the input
|
||||
* rgb and then multiplies all the components by the input alpha. This effectively modulates
|
||||
* the child processor's premul color by a unpremul'ed input and produces a premul output
|
||||
* This assumes that the input color to the returned processor will be unpremul and that the
|
||||
* passed processor (which becomes the returned processor's child) produces a premul output.
|
||||
* The result of the returned processor is a premul of its input color modulated by the child
|
||||
* processor's premul output.
|
||||
*/
|
||||
static sk_sp<GrFragmentProcessor> MulOutputByInputUnpremulColor(sk_sp<GrFragmentProcessor>);
|
||||
static sk_sp<GrFragmentProcessor> MakeInputPremulAndMulByOutput(sk_sp<GrFragmentProcessor>);
|
||||
|
||||
/**
|
||||
* Returns a parent fragment processor that adopts the passed fragment processor as a child.
|
||||
|
@ -153,8 +153,8 @@ sk_sp<GrFragmentProcessor> GrFragmentProcessor::PremulInput(sk_sp<GrFragmentProc
|
||||
return GrFragmentProcessor::RunInSeries(fpPipeline, 2);
|
||||
}
|
||||
|
||||
sk_sp<GrFragmentProcessor> GrFragmentProcessor::MulOutputByInputUnpremulColor(
|
||||
sk_sp<GrFragmentProcessor> fp) {
|
||||
sk_sp<GrFragmentProcessor> GrFragmentProcessor::MakeInputPremulAndMulByOutput(
|
||||
sk_sp<GrFragmentProcessor> fp) {
|
||||
|
||||
class PremulFragmentProcessor : public GrFragmentProcessor {
|
||||
public:
|
||||
|
@ -1192,7 +1192,7 @@ void SkGpuDevice::drawSpecial(const SkDraw& draw,
|
||||
std::move(colorSpaceXform),
|
||||
SkMatrix::I()));
|
||||
if (GrPixelConfigIsAlphaOnly(texture->config())) {
|
||||
fp = GrFragmentProcessor::MulOutputByInputUnpremulColor(std::move(fp));
|
||||
fp = GrFragmentProcessor::MakeInputPremulAndMulByOutput(std::move(fp));
|
||||
} else {
|
||||
fp = GrFragmentProcessor::MulOutputByInputAlpha(std::move(fp));
|
||||
}
|
||||
|
@ -646,7 +646,7 @@ bool SkPaintToGrPaintWithTexture(GrContext* context,
|
||||
sk_sp<GrFragmentProcessor> fpSeries[] = { std::move(shaderFP), std::move(fp) };
|
||||
shaderFP = GrFragmentProcessor::RunInSeries(fpSeries, 2);
|
||||
} else {
|
||||
shaderFP = GrFragmentProcessor::MulOutputByInputUnpremulColor(fp);
|
||||
shaderFP = GrFragmentProcessor::MakeInputPremulAndMulByOutput(fp);
|
||||
}
|
||||
} else {
|
||||
shaderFP = GrFragmentProcessor::MulOutputByInputAlpha(fp);
|
||||
|
Loading…
Reference in New Issue
Block a user