| 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 "Sk4fLinearGradient.h" | 8 #include "Sk4fLinearGradient.h" |
| 9 #include "SkLinearGradient.h" | 9 #include "SkLinearGradient.h" |
| 10 #include "SkRefCnt.h" | 10 #include "SkRefCnt.h" |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 SkSourceGammaTreatment::kRespect)); | 430 SkSourceGammaTreatment::kRespect)); |
| 431 GrAlwaysAssert(fp); | 431 GrAlwaysAssert(fp); |
| 432 return fp; | 432 return fp; |
| 433 } | 433 } |
| 434 | 434 |
| 435 ///////////////////////////////////////////////////////////////////// | 435 ///////////////////////////////////////////////////////////////////// |
| 436 | 436 |
| 437 void GrLinearGradient::GLSLLinearProcessor::emitCode(EmitArgs& args) { | 437 void GrLinearGradient::GLSLLinearProcessor::emitCode(EmitArgs& args) { |
| 438 const GrLinearGradient& ge = args.fFp.cast<GrLinearGradient>(); | 438 const GrLinearGradient& ge = args.fFp.cast<GrLinearGradient>(); |
| 439 this->emitUniforms(args.fUniformHandler, ge); | 439 this->emitUniforms(args.fUniformHandler, ge); |
| 440 SkString t = args.fFragBuilder->ensureFSCoords2D(args.fCoords, 0); | 440 SkString t = args.fFragBuilder->ensureCoords2D(args.fTransformedCoords[0]); |
| 441 t.append(".x"); | 441 t.append(".x"); |
| 442 this->emitColor(args.fFragBuilder, | 442 this->emitColor(args.fFragBuilder, |
| 443 args.fUniformHandler, | 443 args.fUniformHandler, |
| 444 args.fGLSLCaps, | 444 args.fGLSLCaps, |
| 445 ge, | 445 ge, |
| 446 t.c_str(), | 446 t.c_str(), |
| 447 args.fOutputColor, | 447 args.fOutputColor, |
| 448 args.fInputColor, | 448 args.fInputColor, |
| 449 args.fTexSamplers); | 449 args.fTexSamplers); |
| 450 } | 450 } |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 this->shade4_dx_clamp<false, true>(dstC, count, fx, dx, invDx, dithe
r); | 760 this->shade4_dx_clamp<false, true>(dstC, count, fx, dx, invDx, dithe
r); |
| 761 } | 761 } |
| 762 } else { | 762 } else { |
| 763 if (fApplyAlphaAfterInterp) { | 763 if (fApplyAlphaAfterInterp) { |
| 764 this->shade4_dx_clamp<true, false>(dstC, count, fx, dx, invDx, dithe
r); | 764 this->shade4_dx_clamp<true, false>(dstC, count, fx, dx, invDx, dithe
r); |
| 765 } else { | 765 } else { |
| 766 this->shade4_dx_clamp<false, false>(dstC, count, fx, dx, invDx, dith
er); | 766 this->shade4_dx_clamp<false, false>(dstC, count, fx, dx, invDx, dith
er); |
| 767 } | 767 } |
| 768 } | 768 } |
| 769 } | 769 } |
| OLD | NEW |