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

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

Issue 23826002: Rename ShaderType enum to ShaderVisibility (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months 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 | Annotate | Revision Log
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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 534
535 this->emitYCoordUniform(builder); 535 this->emitYCoordUniform(builder);
536 SkString fsCoords; 536 SkString fsCoords;
537 SkString vsCoordsVarying; 537 SkString vsCoordsVarying;
538 GrSLType coordsVaryingType; 538 GrSLType coordsVaryingType;
539 this->setupMatrix(builder, key, &fsCoords, &vsCoordsVarying, &coordsVaryingT ype); 539 this->setupMatrix(builder, key, &fsCoords, &vsCoordsVarying, &coordsVaryingT ype);
540 540
541 // 2 copies of uniform array, 1 for each of vertex & fragment shader, 541 // 2 copies of uniform array, 1 for each of vertex & fragment shader,
542 // to work around Xoom bug. Doesn't seem to cause performance decrease 542 // to work around Xoom bug. Doesn't seem to cause performance decrease
543 // in test apps, but need to keep an eye on it. 543 // in test apps, but need to keep an eye on it.
544 fVSParamUni = builder->addUniformArray(GrGLShaderBuilder::kVertex_ShaderType , 544 fVSParamUni = builder->addUniformArray(GrGLShaderBuilder::kVertex_Visibility ,
545 kFloat_GrSLType, "Radial2VSParams", 6 ); 545 kFloat_GrSLType, "Radial2VSParams", 6 );
546 fFSParamUni = builder->addUniformArray(GrGLShaderBuilder::kFragment_ShaderTy pe, 546 fFSParamUni = builder->addUniformArray(GrGLShaderBuilder::kFragment_Visibili ty,
547 kFloat_GrSLType, "Radial2FSParams", 6 ); 547 kFloat_GrSLType, "Radial2FSParams", 6 );
548 548
549 // For radial gradients without perspective we can pass the linear 549 // For radial gradients without perspective we can pass the linear
550 // part of the quadratic as a varying. 550 // part of the quadratic as a varying.
551 if (kVec2f_GrSLType == coordsVaryingType) { 551 if (kVec2f_GrSLType == coordsVaryingType) {
552 builder->addVarying(kFloat_GrSLType, "Radial2BCoeff", &fVSVaryingName, & fFSVaryingName); 552 builder->addVarying(kFloat_GrSLType, "Radial2BCoeff", &fVSVaryingName, & fFSVaryingName);
553 } 553 }
554 554
555 // VS 555 // VS
556 { 556 {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 } 705 }
706 706
707 #else 707 #else
708 708
709 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c onst { 709 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c onst {
710 SkDEBUGFAIL("Should not call in GPU-less build"); 710 SkDEBUGFAIL("Should not call in GPU-less build");
711 return NULL; 711 return NULL;
712 } 712 }
713 713
714 #endif 714 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698