Move skPaint2GrPaint to SkGr.h/cpp

BUG=skia:
R=bsalomon@google.com, brian@thesalomons.net, robertphillips@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/283803003

git-svn-id: http://skia.googlecode.com/svn/trunk/include@14753 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/SkGr.h b/gpu/SkGr.h
index 1f3c5af..0413299 100644
--- a/gpu/SkGr.h
+++ b/gpu/SkGr.h
@@ -76,6 +76,25 @@
 void GrUnlockAndUnrefCachedBitmapTexture(GrTexture*);
 
 ////////////////////////////////////////////////////////////////////////////////
+
+class SkGpuDevice;
+
+// Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader.
+// justAlpha indicates that the SkPaint's alpha should be used rather than the color.
+// Callers may subsequently modify the GrPaint. Setting constantColor indicates
+// that the final paint will draw the same color at every pixel. This allows
+// an optimization where the the color filter can be applied to the SkPaint's
+// color once while converting to GrPaint and then ignored.
+void SkPaint2GrPaintNoShader(SkGpuDevice* dev, const SkPaint& skPaint, bool justAlpha,
+                             bool constantColor, GrPaint* grPaint);
+
+// This function is similar to skPaint2GrPaintNoShader but also converts
+// skPaint's shader to a GrTexture/GrEffectStage if possible.
+// constantColor has the same meaning as in skPaint2GrPaintNoShader.
+void SkPaint2GrPaintShader(SkGpuDevice* dev, const SkPaint& skPaint,
+                           bool constantColor, GrPaint* grPaint);
+
+////////////////////////////////////////////////////////////////////////////////
 // Classes
 
 class SkGlyphCache;