Don't use GrDrawTarget's AA state bit to convey whether to do custom-aa

Review URL: http://codereview.appspot.com/5314061/



git-svn-id: http://skia.googlecode.com/svn/trunk@2539 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp
index 7a064e8..a45437b 100644
--- a/src/gpu/GrPathRendererChain.cpp
+++ b/src/gpu/GrPathRendererChain.cpp
@@ -32,25 +32,20 @@
     return pr;
 }
 
-GrPathRenderer* GrPathRendererChain::getPathRenderer(const GrDrawTarget* target,
-                                                     const GrPath& path,
-                                                     GrPathFill fill) {
+GrPathRenderer* GrPathRendererChain::getPathRenderer(
+                                        const GrDrawTarget::Caps& targetCaps,
+                                        const GrPath& path,
+                                        GrPathFill fill,
+                                        bool antiAlias) {
     if (!fInit) {
         this->init();
     }
-    bool preferAA = target->isAntialiasState() && 
-                    !target->getRenderTarget()->isMultisampled();
-    GrPathRenderer* nonAAPR = NULL;
     for (int i = 0; i < fChain.count(); ++i) {
-        if (fChain[i]->canDrawPath(target, path, fill)) {
-            if (!preferAA || fChain[i]->supportsAA(target, path, fill)) {
-                return fChain[i];
-            } else {
-                nonAAPR = fChain[i];
-            }
+        if (fChain[i]->canDrawPath(targetCaps, path, fill, antiAlias)) {
+            return fChain[i];
         }
     }
-    return nonAAPR;
+    return NULL;
 }
 
 void GrPathRendererChain::init() {