OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkRadialGradient.h" | 9 #include "SkRadialGradient.h" |
10 #include "SkRadialGradient_Table.h" | 10 #include "SkRadialGradient_Table.h" |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 ///////////////////////////////////////////////////////////////////// | 498 ///////////////////////////////////////////////////////////////////// |
499 | 499 |
500 void GrGLRadialGradient::emitCode(EmitArgs& args) { | 500 void GrGLRadialGradient::emitCode(EmitArgs& args) { |
501 const GrRadialGradient& ge = args.fFp.cast<GrRadialGradient>(); | 501 const GrRadialGradient& ge = args.fFp.cast<GrRadialGradient>(); |
502 this->emitUniforms(args.fBuilder, ge); | 502 this->emitUniforms(args.fBuilder, ge); |
503 SkString t("length("); | 503 SkString t("length("); |
504 t.append(args.fFragBuilder->ensureFSCoords2D(args.fCoords, 0)); | 504 t.append(args.fFragBuilder->ensureFSCoords2D(args.fCoords, 0)); |
505 t.append(")"); | 505 t.append(")"); |
506 this->emitColor(args.fBuilder, | 506 this->emitColor(args.fBuilder, |
507 args.fFragBuilder, | 507 args.fFragBuilder, |
| 508 args.fGLSLCaps, |
508 ge, t.c_str(), | 509 ge, t.c_str(), |
509 args.fOutputColor, | 510 args.fOutputColor, |
510 args.fInputColor, | 511 args.fInputColor, |
511 args.fSamplers); | 512 args.fSamplers); |
512 } | 513 } |
513 | 514 |
514 ///////////////////////////////////////////////////////////////////// | 515 ///////////////////////////////////////////////////////////////////// |
515 | 516 |
516 const GrFragmentProcessor* SkRadialGradient::asFragmentProcessor( | 517 const GrFragmentProcessor* SkRadialGradient::asFragmentProcessor( |
517 GrContext* context, | 518 GrContext* context, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 str->appendScalar(fCenter.fY); | 550 str->appendScalar(fCenter.fY); |
550 str->append(") radius: "); | 551 str->append(") radius: "); |
551 str->appendScalar(fRadius); | 552 str->appendScalar(fRadius); |
552 str->append(" "); | 553 str->append(" "); |
553 | 554 |
554 this->INHERITED::toString(str); | 555 this->INHERITED::toString(str); |
555 | 556 |
556 str->append(")"); | 557 str->append(")"); |
557 } | 558 } |
558 #endif | 559 #endif |
OLD | NEW |