aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/include
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-07 14:38:03 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-07 14:38:03 +0000
commit22c5deaf755223111cb055462ac5bbce623f3a08 (patch)
tree8dbe1b908876b666ac20823637051e786c70e92f /gpu/include
parent2b75f4279a237ceea929ff8ac019f7fbd3ad08b5 (diff)
Fix div by zero in GPU degenerate radials (and add sample and gm baselines)
Review URL: http://codereview.appspot.com/4675062/ git-svn-id: http://skia.googlecode.com/svn/trunk@1817 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/include')
-rw-r--r--gpu/include/GrSamplerState.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gpu/include/GrSamplerState.h b/gpu/include/GrSamplerState.h
index 6d343d04e2..d10d8c4368 100644
--- a/gpu/include/GrSamplerState.h
+++ b/gpu/include/GrSamplerState.h
@@ -203,6 +203,9 @@ public:
GrScalar getRadial2CenterX1() const { return fRadial2CenterX1; }
GrScalar getRadial2Radius0() const { return fRadial2Radius0; }
bool isRadial2PosRoot() const { return fRadial2PosRoot; }
+ // do the radial gradient params lead to a linear (rather than quadratic)
+ // equation.
+ bool radial2IsDegenerate() const { return GR_Scalar1 == fRadial2CenterX1; }
/**
* Sets the parameters for kRadial2_SampleMode. The texture