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

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

Issue 22418006: effects: Replaces uses of GrAssert with SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 "SkTwoPointConicalGradient.h" 9 #include "SkTwoPointConicalGradient.h"
10 10
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 this->emitColorLookup(builder, tName.c_str(), outputColor, inputColo r, samplers[0]); 651 this->emitColorLookup(builder, tName.c_str(), outputColor, inputColo r, samplers[0]);
652 builder->fsCodeAppend("\t}\n"); 652 builder->fsCodeAppend("\t}\n");
653 } 653 }
654 } 654 }
655 } 655 }
656 656
657 void GrGLConical2Gradient::setData(const GrGLUniformManager& uman, 657 void GrGLConical2Gradient::setData(const GrGLUniformManager& uman,
658 const GrDrawEffect& drawEffect) { 658 const GrDrawEffect& drawEffect) {
659 INHERITED::setData(uman, drawEffect); 659 INHERITED::setData(uman, drawEffect);
660 const GrConical2Gradient& data = drawEffect.castEffect<GrConical2Gradient>() ; 660 const GrConical2Gradient& data = drawEffect.castEffect<GrConical2Gradient>() ;
661 GrAssert(data.isDegenerate() == fIsDegenerate); 661 SkASSERT(data.isDegenerate() == fIsDegenerate);
662 SkScalar centerX1 = data.center(); 662 SkScalar centerX1 = data.center();
663 SkScalar radius0 = data.radius(); 663 SkScalar radius0 = data.radius();
664 SkScalar diffRadius = data.diffRadius(); 664 SkScalar diffRadius = data.diffRadius();
665 665
666 if (fCachedCenter != centerX1 || 666 if (fCachedCenter != centerX1 ||
667 fCachedRadius != radius0 || 667 fCachedRadius != radius0 ||
668 fCachedDiffRadius != diffRadius) { 668 fCachedDiffRadius != diffRadius) {
669 669
670 SkScalar a = SkScalarMul(centerX1, centerX1) - diffRadius * diffRadius; 670 SkScalar a = SkScalarMul(centerX1, centerX1) - diffRadius * diffRadius;
671 671
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 str->appendScalar(fCenter2.fY); 756 str->appendScalar(fCenter2.fY);
757 str->append(") radius2: "); 757 str->append(") radius2: ");
758 str->appendScalar(fRadius2); 758 str->appendScalar(fRadius2);
759 str->append(" "); 759 str->append(" ");
760 760
761 this->INHERITED::toString(str); 761 this->INHERITED::toString(str);
762 762
763 str->append(")"); 763 str->append(")");
764 } 764 }
765 #endif 765 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkTwoPointRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698