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/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index f5f3f5b..6bec70f 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -483,7 +483,7 @@
  *  colors and positions. Note: we don't try to flatten the fMapper, so if one
  *  is present, we skip the cache for now.
  */
-void SkGradientShaderBase::commonAsABitmap(SkBitmap* bitmap) const {
+void SkGradientShaderBase::getGradientTableBitmap(SkBitmap* bitmap) const {
     // our caller assumes no external alpha, so we ensure that our cache is
     // built with 0xFF
     this->setCacheAlpha(0xFF);
@@ -689,23 +689,23 @@
 /////////////////////////////////////////////////////////////////////
 
 GrGradientEffect::GrGradientEffect(GrTexture* texture) 
-                                   : fTexture (texture)
-                                   , fUseTexture(true) {
+    : fTexture (texture)
+    , fUseTexture(true) {
     SkSafeRef(fTexture);
 }
 
 GrGradientEffect::GrGradientEffect(GrContext* ctx, 
-                                   const SkShader& shader,
+                                   const SkGradientShaderBase& shader,
                                    GrSamplerState* sampler)
-                                   : fTexture (NULL)
-                                   , fUseTexture (false) {
+    : fTexture (NULL)
+    , fUseTexture (false) {
     // TODO: check for simple cases where we don't need a texture:
     //GradientInfo info;
     //shader.asAGradient(&info);
     //if (info.fColorCount == 2) { ...
 
     SkBitmap bitmap;
-    shader.asABitmap(&bitmap, NULL, NULL);
+    shader.getGradientTableBitmap(&bitmap);
 
     GrContext::TextureCacheEntry entry = GrLockCachedBitmapTexture(ctx, bitmap,
                                                                    sampler->textureParams());