Renamed and made public SkGradientShaderBases's 'commonAsAGradient' to 'getGradientTableBitmap', and use that instead of asABitmap in gradient custom stage setup.

Also tidied up Gr gradient implementation constructors, to take the appropriate SkGradientShaderBase subclass, and where necessary (namely 2pt radial/conical) made them obtain extra parameters from that object, rather than passing them in in addition to it.
Review URL: https://codereview.appspot.com/6449057

git-svn-id: http://skia.googlecode.com/svn/trunk@4808 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 40ce528..feef3b9 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -257,7 +257,7 @@
     SkScalar diffLen = 0;
 
     if (bitmap) {
-        this->commonAsABitmap(bitmap);
+        this->getGradientTableBitmap(bitmap);
     }
     if (matrix) {
         diffLen = diff.length();
@@ -308,8 +308,7 @@
     sampler->textureParams()->setTileModeX(fTileMode);
     sampler->textureParams()->setTileModeY(kClamp_TileMode);
     sampler->textureParams()->setBilerp(true);
-    return SkNEW_ARGS(GrConical2Gradient, (context, *this, sampler, 
-                      diffLen, fRadius1, fRadius2 - fRadius1));
+    return SkNEW_ARGS(GrConical2Gradient, (context, *this, sampler));
 }
 
 SkTwoPointConicalGradient::SkTwoPointConicalGradient(
@@ -611,7 +610,7 @@
                                        GrScalar center,
                                        GrScalar radius,
                                        GrScalar diffRadius)
-    : INHERITED (texture)
+    : INHERITED(texture)
     , fCenterX1 (center)
     , fRadius0 (radius)
     , fDiffRadius (diffRadius) {
@@ -619,15 +618,12 @@
 }
 
 GrConical2Gradient::GrConical2Gradient(GrContext* ctx, 
-                                       const SkShader& shader,
-                                       GrSamplerState* sampler,
-                                       SkScalar center,
-                                       SkScalar startRadius,
-                                       SkScalar diffRadius)
-                                       : INHERITED(ctx, shader, sampler) 
-                                       , fCenterX1(center)
-                                       , fRadius0(startRadius)
-                                       , fDiffRadius(diffRadius) {
+                                       const SkTwoPointConicalGradient& shader,
+                                       GrSamplerState* sampler)
+    : INHERITED(ctx, shader, sampler) 
+    , fCenterX1(shader.getCenterX1())
+    , fRadius0(shader.getStartRadius())
+    , fDiffRadius(shader.getDiffRadius()) {
 }
 
 GrConical2Gradient::~GrConical2Gradient() {