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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, | 547 SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center, radius, |
548 colors, stops,
colorCount, | 548 colors, stops,
colorCount, |
549 tm)); | 549 tm)); |
550 SkPaint paint; | 550 SkPaint paint; |
551 return shader->asNewEffect(context, paint); | 551 return shader->asNewEffect(context, paint); |
552 } | 552 } |
553 | 553 |
554 ///////////////////////////////////////////////////////////////////// | 554 ///////////////////////////////////////////////////////////////////// |
555 | 555 |
556 void GrGLRadialGradient::emitCode(GrGLShaderBuilder* builder, | 556 void GrGLRadialGradient::emitCode(GrGLShaderBuilder* builder, |
557 const GrEffectStage& stage, | 557 const GrEffectStage&, |
558 EffectKey key, | 558 EffectKey key, |
559 const char* vertexCoords, | 559 const char* vertexCoords, |
560 const char* outputColor, | 560 const char* outputColor, |
561 const char* inputColor, | 561 const char* inputColor, |
562 const TextureSamplerArray& samplers) { | 562 const TextureSamplerArray& samplers) { |
563 this->emitYCoordUniform(builder); | 563 this->emitYCoordUniform(builder); |
564 const char* coords; | 564 const char* coords; |
565 this->setupMatrix(builder, key, vertexCoords, &coords); | 565 this->setupMatrix(builder, key, vertexCoords, &coords); |
566 SkString t("length("); | 566 SkString t("length("); |
567 t.append(coords); | 567 t.append(coords); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 str->appendScalar(fCenter.fY); | 601 str->appendScalar(fCenter.fY); |
602 str->append(") radius: "); | 602 str->append(") radius: "); |
603 str->appendScalar(fRadius); | 603 str->appendScalar(fRadius); |
604 str->append(" "); | 604 str->append(" "); |
605 | 605 |
606 this->INHERITED::toString(str); | 606 this->INHERITED::toString(str); |
607 | 607 |
608 str->append(")"); | 608 str->append(")"); |
609 } | 609 } |
610 #endif | 610 #endif |
OLD | NEW |