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

Side by Side Diff: src/effects/gradients/SkTwoPointRadialGradient.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
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 } 633 }
634 634
635 this->emitColorLookup(builder, t.c_str(), outputColor, inputColor, sampl ers[0]); 635 this->emitColorLookup(builder, t.c_str(), outputColor, inputColor, sampl ers[0]);
636 } 636 }
637 } 637 }
638 638
639 void GrGLRadial2Gradient::setData(const GrGLUniformManager& uman, 639 void GrGLRadial2Gradient::setData(const GrGLUniformManager& uman,
640 const GrDrawEffect& drawEffect) { 640 const GrDrawEffect& drawEffect) {
641 INHERITED::setData(uman, drawEffect); 641 INHERITED::setData(uman, drawEffect);
642 const GrRadial2Gradient& data = drawEffect.castEffect<GrRadial2Gradient>(); 642 const GrRadial2Gradient& data = drawEffect.castEffect<GrRadial2Gradient>();
643 GrAssert(data.isDegenerate() == fIsDegenerate); 643 SkASSERT(data.isDegenerate() == fIsDegenerate);
644 SkScalar centerX1 = data.center(); 644 SkScalar centerX1 = data.center();
645 SkScalar radius0 = data.radius(); 645 SkScalar radius0 = data.radius();
646 if (fCachedCenter != centerX1 || 646 if (fCachedCenter != centerX1 ||
647 fCachedRadius != radius0 || 647 fCachedRadius != radius0 ||
648 fCachedPosRoot != data.isPosRoot()) { 648 fCachedPosRoot != data.isPosRoot()) {
649 649
650 SkScalar a = SkScalarMul(centerX1, centerX1) - SK_Scalar1; 650 SkScalar a = SkScalarMul(centerX1, centerX1) - SK_Scalar1;
651 651
652 // When we're in the degenerate (linear) case, the second 652 // When we're in the degenerate (linear) case, the second
653 // value will be INF but the program doesn't read it. (We 653 // value will be INF but the program doesn't read it. (We
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 } 708 }
709 709
710 #else 710 #else
711 711
712 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c onst { 712 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c onst {
713 SkDEBUGFAIL("Should not call in GPU-less build"); 713 SkDEBUGFAIL("Should not call in GPU-less build");
714 return NULL; 714 return NULL;
715 } 715 }
716 716
717 #endif 717 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698