Lines Matching refs:shader
151 static std::unique_ptr<GrFragmentProcessor> make_gradient(const SkGradientShaderBase& shader, in make_gradient() argument
161 bool inputPremul = shader.getGradFlags() & SkGradientShader::kInterpolateColorsInPremul_Flag; in make_gradient()
163 SkAutoSTMalloc<4, SkPMColor4f> colors(shader.fColorCount); in make_gradient()
164 SkColor4fXformer xformedColors(shader.fOrigColors4f, shader.fColorCount, in make_gradient()
165 shader.fColorSpace.get(), args.fDstColorSpaceInfo->colorSpace()); in make_gradient()
166 for (int i = 0; i < shader.fColorCount; i++) { in make_gradient()
180 if (shader.fOrigPos) { in make_gradient()
181 positions = shader.fOrigPos; in make_gradient()
183 implicitPos.reserve(shader.fColorCount); in make_gradient()
184 SkScalar posScale = SK_Scalar1 / (shader.fColorCount - 1); in make_gradient()
185 for (int i = 0 ; i < shader.fColorCount; i++) { in make_gradient()
193 colors.get(), positions, shader.fColorCount, inputPremul, args); in make_gradient()
207 switch(shader.getTileMode()) { in make_gradient()
222 colors[0], colors[shader.fColorCount - 1], makePremul, allOpaque); in make_gradient()
243 std::unique_ptr<GrFragmentProcessor> MakeLinear(const SkLinearGradient& shader, in MakeLinear() argument
245 return make_gradient(shader, args, GrLinearGradientLayout::Make(shader, args)); in MakeLinear()
248 std::unique_ptr<GrFragmentProcessor> MakeRadial(const SkRadialGradient& shader, in MakeRadial() argument
250 return make_gradient(shader,args, GrRadialGradientLayout::Make(shader, args)); in MakeRadial()
253 std::unique_ptr<GrFragmentProcessor> MakeSweep(const SkSweepGradient& shader, in MakeSweep() argument
255 return make_gradient(shader,args, GrSweepGradientLayout::Make(shader, args)); in MakeSweep()
258 std::unique_ptr<GrFragmentProcessor> MakeConical(const SkTwoPointConicalGradient& shader, in MakeConical() argument
260 return make_gradient(shader, args, GrTwoPointConicalGradientLayout::Make(shader, args)); in MakeConical()