Lines Matching refs:src
8 #include "src/gpu/effects/GrBlendFragmentProcessor.h"
10 #include "src/gpu/GrFragmentProcessor.h"
11 #include "src/gpu/SkGr.h"
12 #include "src/gpu/glsl/GrGLSLBlend.h"
13 #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
29 static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> src,
33 new BlendFragmentProcessor(std::move(src), std::move(dst), mode));
47 BlendFragmentProcessor(std::unique_ptr<GrFragmentProcessor> src,
50 : INHERITED(kBlendFragmentProcessor_ClassID, OptFlags(src.get(), dst.get(), mode))
53 this->registerChild(std::move(src));
67 static OptimizationFlags OptFlags(const GrFragmentProcessor* src,
74 SkDEBUGFAIL("Shouldn't have created a Blend FP as 'clear', 'src', or 'dst'.");
78 // Produces opaque if both src and dst are opaque. These also will modulate the child's
84 if (src && dst) {
85 flags = ProcessorOptimizationFlags(src) & ProcessorOptimizationFlags(dst) &
87 } else if (src) {
88 flags = ProcessorOptimizationFlags(src) &
110 // DstATop is the converse of kSrcATop. Screen is also opaque if the src is a opaque.
113 flags = ProcessorOptimizationFlags(src) & kPreservesOpaqueInput_OptimizationFlag;
116 // These modes are all opaque if either src or dst is opaque. All the advanced modes
117 // compute alpha as src-over.
135 flags = (ProcessorOptimizationFlags(src) | ProcessorOptimizationFlags(dst)) &
140 (!src || src->hasConstantOutputForConstantInput()) &&
157 const auto* src = this->childProcessor(0);
160 SkPMColor4f srcColor = ConstantOutputForConstantInput(src, input);
183 std::unique_ptr<GrFragmentProcessor> src(GrProcessorUnitTest::MakeOptionalChildFP(d));
186 std::swap(src, dst);
194 new BlendFragmentProcessor(std::move(src), std::move(dst), mode));
212 // Invoke src/dst with our input color (or substitute input color if no child FP)
216 // Blend src and dst colors together.
230 std::unique_ptr<GrFragmentProcessor> src,
237 return src;
241 return BlendFragmentProcessor::Make(std::move(src), std::move(dst), mode);