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

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

Issue 62163004: Added support for Chrome's gpu command buffer extension BindUniformLocation. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixed compile error on the bots + feedback. Created 7 years, 1 month 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 * 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 "SkTwoPointConicalGradient.h" 8 #include "SkTwoPointConicalGradient.h"
9 9
10 static int valid_divide(float numer, float denom, float* ratio) { 10 static int valid_divide(float numer, float denom, float* ratio) {
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 // down). 648 // down).
649 float values[6] = { 649 float values[6] = {
650 SkScalarToFloat(a * 4), 650 SkScalarToFloat(a * 4),
651 1.f / (SkScalarToFloat(a)), 651 1.f / (SkScalarToFloat(a)),
652 SkScalarToFloat(centerX1), 652 SkScalarToFloat(centerX1),
653 SkScalarToFloat(radius0), 653 SkScalarToFloat(radius0),
654 SkScalarToFloat(SkScalarMul(radius0, radius0)), 654 SkScalarToFloat(SkScalarMul(radius0, radius0)),
655 SkScalarToFloat(diffRadius) 655 SkScalarToFloat(diffRadius)
656 }; 656 };
657 657
658 uman.set1fv(fParamUni, 0, 6, values); 658 uman.set1fv(fParamUni, 6, values);
659 fCachedCenter = centerX1; 659 fCachedCenter = centerX1;
660 fCachedRadius = radius0; 660 fCachedRadius = radius0;
661 fCachedDiffRadius = diffRadius; 661 fCachedDiffRadius = diffRadius;
662 } 662 }
663 } 663 }
664 664
665 GrGLEffect::EffectKey GrGLConical2Gradient::GenKey(const GrDrawEffect& drawEffec t, 665 GrGLEffect::EffectKey GrGLConical2Gradient::GenKey(const GrDrawEffect& drawEffec t,
666 const GrGLCaps&) { 666 const GrGLCaps&) {
667 enum { 667 enum {
668 kIsDegenerate = 1 << kBaseKeyBitCnt, 668 kIsDegenerate = 1 << kBaseKeyBitCnt,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 str->appendScalar(fCenter2.fY); 727 str->appendScalar(fCenter2.fY);
728 str->append(") radius2: "); 728 str->append(") radius2: ");
729 str->appendScalar(fRadius2); 729 str->appendScalar(fRadius2);
730 str->append(" "); 730 str->append(" ");
731 731
732 this->INHERITED::toString(str); 732 this->INHERITED::toString(str);
733 733
734 str->append(")"); 734 str->append(")");
735 } 735 }
736 #endif 736 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/gradients/SkTwoPointRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698