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
diff --git a/gpu/include/GrSamplerState.h b/gpu/include/GrSamplerState.h
index 6d343d0..d10d8c4 100644
--- a/gpu/include/GrSamplerState.h
+++ b/gpu/include/GrSamplerState.h
@@ -203,6 +203,9 @@
     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