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 | 10 |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 const GrLinearGradient& ge = args.fFp.cast<GrLinearGradient>(); | 427 const GrLinearGradient& ge = args.fFp.cast<GrLinearGradient>(); |
428 this->emitUniforms(args.fUniformHandler, ge); | 428 this->emitUniforms(args.fUniformHandler, ge); |
429 SkString t = args.fFragBuilder->ensureFSCoords2D(args.fCoords, 0); | 429 SkString t = args.fFragBuilder->ensureFSCoords2D(args.fCoords, 0); |
430 t.append(".x"); | 430 t.append(".x"); |
431 this->emitColor(args.fFragBuilder, | 431 this->emitColor(args.fFragBuilder, |
432 args.fUniformHandler, | 432 args.fUniformHandler, |
433 args.fGLSLCaps, | 433 args.fGLSLCaps, |
434 ge, t.c_str(), | 434 ge, t.c_str(), |
435 args.fOutputColor, | 435 args.fOutputColor, |
436 args.fInputColor, | 436 args.fInputColor, |
437 args.fSamplers); | 437 args.fTexSamplers); |
438 } | 438 } |
439 | 439 |
440 ///////////////////////////////////////////////////////////////////// | 440 ///////////////////////////////////////////////////////////////////// |
441 | 441 |
442 const GrFragmentProcessor* SkLinearGradient::asFragmentProcessor( | 442 const GrFragmentProcessor* SkLinearGradient::asFragmentProcessor( |
443 GrContext* context, | 443 GrContext* context, |
444 const SkMatrix& viewm, | 444 const SkMatrix& viewm, |
445 const SkMatrix* localMatrix, | 445 const SkMatrix* localMatrix, |
446 SkFilterQuality) const { | 446 SkFilterQuality) const { |
447 SkASSERT(context); | 447 SkASSERT(context); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 this->shade4_dx_clamp<false, true>(dstC, count, fx, dx, invDx, dithe
r); | 744 this->shade4_dx_clamp<false, true>(dstC, count, fx, dx, invDx, dithe
r); |
745 } | 745 } |
746 } else { | 746 } else { |
747 if (fApplyAlphaAfterInterp) { | 747 if (fApplyAlphaAfterInterp) { |
748 this->shade4_dx_clamp<true, false>(dstC, count, fx, dx, invDx, dithe
r); | 748 this->shade4_dx_clamp<true, false>(dstC, count, fx, dx, invDx, dithe
r); |
749 } else { | 749 } else { |
750 this->shade4_dx_clamp<false, false>(dstC, count, fx, dx, invDx, dith
er); | 750 this->shade4_dx_clamp<false, false>(dstC, count, fx, dx, invDx, dith
er); |
751 } | 751 } |
752 } | 752 } |
753 } | 753 } |
OLD | NEW |