GrCustomStage Renaming Part 2

GrSamplerState member rename
GrCustomStageUnitTest rename
some comment updates
Review URL: https://codereview.appspot.com/6771043

git-svn-id: http://skia.googlecode.com/svn/trunk@6078 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 5b351d3..21b415d 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -540,10 +540,10 @@
                                                                  tm));
     GrSamplerState sampler;
     shader->asNewCustomStage(context, &sampler);
-    GrAssert(NULL != sampler.getCustomStage());
+    GrAssert(NULL != sampler.getEffect());
     // const_cast and ref is a hack! Will remove when asNewCustomStage returns GrEffect*
-    sampler.getCustomStage()->ref();
-    return const_cast<GrEffect*>(sampler.getCustomStage());
+    sampler.getEffect()->ref();
+    return const_cast<GrEffect*>(sampler.getEffect());
 }
 
 /////////////////////////////////////////////////////////////////////
@@ -570,9 +570,9 @@
             return false;
         }
         matrix.postConcat(fPtsToUnit);
-        sampler->setCustomStage(stage, matrix);
+        sampler->setEffect(stage, matrix);
     } else {
-        sampler->setCustomStage(stage, fPtsToUnit);
+        sampler->setEffect(stage, fPtsToUnit);
     }
 
     return true;
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index ca8325d..74d16d5 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -539,10 +539,10 @@
                                                                  tm));
     GrSamplerState sampler;
     shader->asNewCustomStage(context, &sampler);
-    GrAssert(NULL != sampler.getCustomStage());
+    GrAssert(NULL != sampler.getEffect());
     // const_cast and ref is a hack! Will remove when asNewCustomStage returns GrEffect*
-    sampler.getCustomStage()->ref();
-    return const_cast<GrEffect*>(sampler.getCustomStage());
+    sampler.getEffect()->ref();
+    return const_cast<GrEffect*>(sampler.getEffect());
 }
 
 /////////////////////////////////////////////////////////////////////
@@ -568,9 +568,9 @@
             return false;
         }
         matrix.postConcat(fPtsToUnit);
-        sampler->setCustomStage(stage, matrix);
+        sampler->setEffect(stage, matrix);
     } else {
-        sampler->setCustomStage(stage, fPtsToUnit);
+        sampler->setEffect(stage, fPtsToUnit);
     }
 
     return true;
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 416babc..365507b 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -445,10 +445,10 @@
                                                                 colors, stops, colorCount));
     GrSamplerState sampler;
     shader->asNewCustomStage(context, &sampler);
-    GrAssert(NULL != sampler.getCustomStage());
+    GrAssert(NULL != sampler.getEffect());
     // const_cast and ref is a hack! Will remove when asNewCustomStage returns GrEffect*
-    sampler.getCustomStage()->ref();
-    return const_cast<GrEffect*>(sampler.getCustomStage());
+    sampler.getEffect()->ref();
+    return const_cast<GrEffect*>(sampler.getEffect());
 }
 
 /////////////////////////////////////////////////////////////////////
@@ -475,9 +475,9 @@
             return false;
         }
         matrix.postConcat(fPtsToUnit);
-        sampler->setCustomStage(stage, matrix);
+        sampler->setEffect(stage, matrix);
     } else {
-        sampler->setCustomStage(stage, fPtsToUnit);
+        sampler->setEffect(stage, fPtsToUnit);
     }
 
     return true;
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 1b0f58f..4472d03 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -439,10 +439,10 @@
                                                                           tm));
     GrSamplerState sampler;
     shader->asNewCustomStage(context, &sampler);
-    GrAssert(NULL != sampler.getCustomStage());
+    GrAssert(NULL != sampler.getEffect());
     // const_cast and ref is a hack! Will remove when asNewCustomStage returns GrEffect*
-    sampler.getCustomStage()->ref();
-    return const_cast<GrEffect*>(sampler.getCustomStage());
+    sampler.getEffect()->ref();
+    return const_cast<GrEffect*>(sampler.getEffect());
 }
 
 
@@ -693,7 +693,7 @@
         matrix.preConcat(localM);
     }
 
-    sampler->setCustomStage(SkNEW_ARGS(GrConical2Gradient, (context, *this, fTileMode)), matrix)->unref();
+    sampler->setEffect(SkNEW_ARGS(GrConical2Gradient, (context, *this, fTileMode)), matrix)->unref();
 
     return true;
 }
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index 50938f6..78220f8 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -473,10 +473,10 @@
                                                                          tm));
     GrSamplerState sampler;
     shader->asNewCustomStage(context, &sampler);
-    GrAssert(NULL != sampler.getCustomStage());
+    GrAssert(NULL != sampler.getEffect());
     // const_cast and ref is a hack! Will remove when asNewCustomStage returns GrEffect*
-    sampler.getCustomStage()->ref();
-    return const_cast<GrEffect*>(sampler.getCustomStage());
+    sampler.getEffect()->ref();
+    return const_cast<GrEffect*>(sampler.getEffect());
 }
 
 /////////////////////////////////////////////////////////////////////
@@ -665,7 +665,7 @@
         matrix.preConcat(localM);
     }
 
-    sampler->setCustomStage(SkNEW_ARGS(GrRadial2Gradient, (context, *this, fTileMode)), matrix)->unref();
+    sampler->setEffect(SkNEW_ARGS(GrRadial2Gradient, (context, *this, fTileMode)), matrix)->unref();
     return true;
 }