Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1169)

Side by Side Diff: src/effects/gradients/SkTwoPointRadialGradient.cpp

Issue 788733003: Make addUniform take a precision (Closed) Base URL: https://skia.googlesource.com/skia.git@move_prec
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "SkTwoPointRadialGradient.h" 9 #include "SkTwoPointRadialGradient.h"
10 10
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 void GrGLRadial2Gradient::emitCode(GrGLFPBuilder* builder, 560 void GrGLRadial2Gradient::emitCode(GrGLFPBuilder* builder,
561 const GrFragmentProcessor& fp, 561 const GrFragmentProcessor& fp,
562 const char* outputColor, 562 const char* outputColor,
563 const char* inputColor, 563 const char* inputColor,
564 const TransformedCoordsArray& coords, 564 const TransformedCoordsArray& coords,
565 const TextureSamplerArray& samplers) { 565 const TextureSamplerArray& samplers) {
566 const GrRadial2Gradient& ge = fp.cast<GrRadial2Gradient>(); 566 const GrRadial2Gradient& ge = fp.cast<GrRadial2Gradient>();
567 this->emitUniforms(builder, ge); 567 this->emitUniforms(builder, ge);
568 fParamUni = builder->addUniformArray(GrGLProgramBuilder::kFragment_Visibilit y, 568 fParamUni = builder->addUniformArray(GrGLProgramBuilder::kFragment_Visibilit y,
569 kFloat_GrSLType, "Radial2FSParams", 6); 569 kFloat_GrSLType, kDefault_GrSLPrecision ,
570 "Radial2FSParams", 6);
570 571
571 SkString cName("c"); 572 SkString cName("c");
572 SkString ac4Name("ac4"); 573 SkString ac4Name("ac4");
573 SkString rootName("root"); 574 SkString rootName("root");
574 SkString t; 575 SkString t;
575 SkString p0; 576 SkString p0;
576 SkString p1; 577 SkString p1;
577 SkString p2; 578 SkString p2;
578 SkString p3; 579 SkString p3;
579 SkString p4; 580 SkString p4;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 710
710 #else 711 #else
711 712
712 bool SkTwoPointRadialGradient::asFragmentProcessor(GrContext*, const SkPaint&, c onst SkMatrix*, 713 bool SkTwoPointRadialGradient::asFragmentProcessor(GrContext*, const SkPaint&, c onst SkMatrix*,
713 GrColor*, GrFragmentProcessor **) const { 714 GrColor*, GrFragmentProcessor **) const {
714 SkDEBUGFAIL("Should not call in GPU-less build"); 715 SkDEBUGFAIL("Should not call in GPU-less build");
715 return false; 716 return false;
716 } 717 }
717 718
718 #endif 719 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp ('k') | src/gpu/effects/GrBicubicEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698