OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkRadialGradient.h" | 8 #include "SkRadialGradient.h" |
9 #include "SkNx.h" | 9 #include "SkNx.h" |
10 | 10 |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 GrAlwaysAssert(fp); | 326 GrAlwaysAssert(fp); |
327 return fp; | 327 return fp; |
328 } | 328 } |
329 | 329 |
330 ///////////////////////////////////////////////////////////////////// | 330 ///////////////////////////////////////////////////////////////////// |
331 | 331 |
332 void GrRadialGradient::GLSLRadialProcessor::emitCode(EmitArgs& args) { | 332 void GrRadialGradient::GLSLRadialProcessor::emitCode(EmitArgs& args) { |
333 const GrRadialGradient& ge = args.fFp.cast<GrRadialGradient>(); | 333 const GrRadialGradient& ge = args.fFp.cast<GrRadialGradient>(); |
334 this->emitUniforms(args.fUniformHandler, ge); | 334 this->emitUniforms(args.fUniformHandler, ge); |
335 SkString t("length("); | 335 SkString t("length("); |
336 t.append(args.fFragBuilder->ensureFSCoords2D(args.fCoords, 0)); | 336 t.append(args.fFragBuilder->ensureCoords2D(args.fTransformedCoords[0])); |
337 t.append(")"); | 337 t.append(")"); |
338 this->emitColor(args.fFragBuilder, | 338 this->emitColor(args.fFragBuilder, |
339 args.fUniformHandler, | 339 args.fUniformHandler, |
340 args.fGLSLCaps, | 340 args.fGLSLCaps, |
341 ge, t.c_str(), | 341 ge, t.c_str(), |
342 args.fOutputColor, | 342 args.fOutputColor, |
343 args.fInputColor, | 343 args.fInputColor, |
344 args.fTexSamplers); | 344 args.fTexSamplers); |
345 } | 345 } |
346 | 346 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 str->appendScalar(fCenter.fY); | 378 str->appendScalar(fCenter.fY); |
379 str->append(") radius: "); | 379 str->append(") radius: "); |
380 str->appendScalar(fRadius); | 380 str->appendScalar(fRadius); |
381 str->append(" "); | 381 str->append(" "); |
382 | 382 |
383 this->INHERITED::toString(str); | 383 this->INHERITED::toString(str); |
384 | 384 |
385 str->append(")"); | 385 str->append(")"); |
386 } | 386 } |
387 #endif | 387 #endif |
OLD | NEW |