Move setPaint from GrContext to GrDrawState.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6624045

git-svn-id: http://skia.googlecode.com/svn/trunk@5823 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 05da3df..ca3b2c1 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -20,6 +20,7 @@
 
 #include "SkXfermode.h"
 
+class GrPaint;
 
 class GrDrawState : public GrRefCnt {
 public:
@@ -89,7 +90,15 @@
         fColorFilterMode = SkXfermode::kDst_Mode;
         fColorFilterColor = 0x0;
         fDrawFace = kBoth_DrawFace;
-     }
+    }
+
+    /**
+     * Initializes the GrDrawState based on a GrPaint. Note that GrDrawState
+     * encompases more than GrPaint. Aspects of GrDrawState that have no
+     * GrPaint equivalents are not modified. GrPaint has fewer stages than
+     * GrDrawState. The extra GrDrawState stages are disabled.
+     */
+    void setFromPaint(const GrPaint& paint);
 
     ///////////////////////////////////////////////////////////////////////////
     /// @name Color