Lines Matching defs:shader
74 // Clamping and/or wrapping was already handled by the parent shader so the output
149 // For low interval counts, the extra components are ignored in the shader, but the uniform
431 // Analyze the shader's color stops and positions and chooses an appropriate colorizer to represent
543 uniform shader colorizer;
544 uniform shader gradLayout;
606 uniform shader colorizer;
607 uniform shader gradLayout;
673 const SkGradientShaderBase& shader,
677 // No shader is possible if a layout couldn't be created, e.g. a layout-specific Make() returned
685 if (!shader.totalLocalMatrix(args.fPreLocalMatrix)->invert(&matrix)) {
689 matrix.postConcat(overrideMatrix ? *overrideMatrix : shader.getGradientMatrix());
694 bool inputPremul = shader.getGradFlags() & SkGradientShader::kInterpolateColorsInPremul_Flag;
696 SkAutoSTMalloc<4, SkPMColor4f> colors(shader.fColorCount);
697 SkColor4fXformer xformedColors(shader.fOrigColors4f, shader.fColorCount,
698 shader.fColorSpace.get(), args.fDstColorInfo->colorSpace());
699 for (int i = 0; i < shader.fColorCount; i++) {
709 // implementation performs a branch for every position index. Since the shader conversion
713 if (shader.fOrigPos) {
714 positions = shader.fOrigPos;
716 implicitPos.reserve_back(shader.fColorCount);
717 SkScalar posScale = SK_Scalar1 / (shader.fColorCount - 1);
718 for (int i = 0 ; i < shader.fColorCount; i++) {
726 colors.get(), positions, shader.fColorCount, inputPremul, args);
741 switch(shader.getTileMode()) {
756 colors[0], colors[shader.fColorCount - 1],
773 std::unique_ptr<GrFragmentProcessor> MakeLinear(const SkLinearGradient& shader,
790 return make_gradient(shader, args, std::move(fp));
793 std::unique_ptr<GrFragmentProcessor> MakeRadial(const SkRadialGradient& shader,
803 return make_gradient(shader, args, std::move(fp));
806 std::unique_ptr<GrFragmentProcessor> MakeSweep(const SkSweepGradient& shader,
833 "bias", shader.getTBias(),
834 "scale", shader.getTScale(),
836 return make_gradient(shader, args, std::move(fp));
839 std::unique_ptr<GrFragmentProcessor> MakeConical(const SkTwoPointConicalGradient& shader,
845 switch (shader.getType()) {
860 float r0 = shader.getStartRadius() / shader.getCenterX1();
876 float dr = shader.getDiffRadius();
877 float r0 = shader.getStartRadius() / dr;
888 matrix.set(SkMatrix::Translate(-shader.getStartCenter().fX,
889 -shader.getStartCenter().fY));
966 const SkTwoPointConicalGradient::FocalData& focalData = shader.getFocalData();
984 return make_gradient(shader, args, std::move(fp), matrix.getMaybeNull());