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

Side by Side Diff: src/effects/gradients/SkTwoPointRadialGradient.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 /* 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 // down). 631 // down).
632 float values[6] = { 632 float values[6] = {
633 SkScalarToFloat(a), 633 SkScalarToFloat(a),
634 1 / (2.f * SkScalarToFloat(a)), 634 1 / (2.f * SkScalarToFloat(a)),
635 SkScalarToFloat(centerX1), 635 SkScalarToFloat(centerX1),
636 SkScalarToFloat(radius0), 636 SkScalarToFloat(radius0),
637 SkScalarToFloat(SkScalarMul(radius0, radius0)), 637 SkScalarToFloat(SkScalarMul(radius0, radius0)),
638 data.isPosRoot() ? 1.f : -1.f 638 data.isPosRoot() ? 1.f : -1.f
639 }; 639 };
640 640
641 uman.set1fv(fParamUni, 0, 6, values); 641 uman.set1fv(fParamUni, 6, values);
642 fCachedCenter = centerX1; 642 fCachedCenter = centerX1;
643 fCachedRadius = radius0; 643 fCachedRadius = radius0;
644 fCachedPosRoot = data.isPosRoot(); 644 fCachedPosRoot = data.isPosRoot();
645 } 645 }
646 } 646 }
647 647
648 GrGLEffect::EffectKey GrGLRadial2Gradient::GenKey(const GrDrawEffect& drawEffect , 648 GrGLEffect::EffectKey GrGLRadial2Gradient::GenKey(const GrDrawEffect& drawEffect ,
649 const GrGLCaps&) { 649 const GrGLCaps&) {
650 enum { 650 enum {
651 kIsDegenerate = 1 << kBaseKeyBitCnt, 651 kIsDegenerate = 1 << kBaseKeyBitCnt,
(...skipping 30 matching lines...) Expand all
682 } 682 }
683 683
684 #else 684 #else
685 685
686 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c onst { 686 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c onst {
687 SkDEBUGFAIL("Should not call in GPU-less build"); 687 SkDEBUGFAIL("Should not call in GPU-less build");
688 return NULL; 688 return NULL;
689 } 689 }
690 690
691 #endif 691 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.cpp ('k') | src/gpu/effects/GrBicubicEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698