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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 | 552 |
553 ///////////////////////////////////////////////////////////////////// | 553 ///////////////////////////////////////////////////////////////////// |
554 | 554 |
555 void GrGLRadialGradient::emitCode(GrGLShaderBuilder* builder, | 555 void GrGLRadialGradient::emitCode(GrGLShaderBuilder* builder, |
556 const GrDrawEffect&, | 556 const GrDrawEffect&, |
557 EffectKey key, | 557 EffectKey key, |
558 const char* outputColor, | 558 const char* outputColor, |
559 const char* inputColor, | 559 const char* inputColor, |
560 const TextureSamplerArray& samplers) { | 560 const TextureSamplerArray& samplers) { |
561 this->emitYCoordUniform(builder); | 561 this->emitYCoordUniform(builder); |
562 const char* coords; | 562 SkString coords; |
563 this->setupMatrix(builder, key, &coords); | 563 this->setupMatrix(builder, key, &coords); |
564 SkString t("length("); | 564 SkString t("length("); |
565 t.append(coords); | 565 t.append(coords); |
566 t.append(")"); | 566 t.append(")"); |
567 this->emitColorLookup(builder, t.c_str(), outputColor, inputColor, samplers[
0]); | 567 this->emitColorLookup(builder, t.c_str(), outputColor, inputColor, samplers[
0]); |
568 } | 568 } |
569 | 569 |
570 ///////////////////////////////////////////////////////////////////// | 570 ///////////////////////////////////////////////////////////////////// |
571 | 571 |
572 GrEffectRef* SkRadialGradient::asNewEffect(GrContext* context, const SkPaint&) c
onst { | 572 GrEffectRef* SkRadialGradient::asNewEffect(GrContext* context, const SkPaint&) c
onst { |
(...skipping 26 matching lines...) Expand all Loading... |
599 str->appendScalar(fCenter.fY); | 599 str->appendScalar(fCenter.fY); |
600 str->append(") radius: "); | 600 str->append(") radius: "); |
601 str->appendScalar(fRadius); | 601 str->appendScalar(fRadius); |
602 str->append(" "); | 602 str->append(" "); |
603 | 603 |
604 this->INHERITED::toString(str); | 604 this->INHERITED::toString(str); |
605 | 605 |
606 str->append(")"); | 606 str->append(")"); |
607 } | 607 } |
608 #endif | 608 #endif |
OLD | NEW |