Chromium Code Reviews| Index: include/gpu/SkGr.h |
| diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h |
| index 1f3c5affe444e9208fbf17faa74d237a9214f799..d457da9f4561b485c925d5da2d50afc91bd89768 100644 |
| --- a/include/gpu/SkGr.h |
| +++ b/include/gpu/SkGr.h |
| @@ -76,6 +76,26 @@ GrTexture* GrLockAndRefCachedBitmapTexture(GrContext*, const SkBitmap&, const Gr |
| void GrUnlockAndUnrefCachedBitmapTexture(GrTexture*); |
| //////////////////////////////////////////////////////////////////////////////// |
| + |
| +class SkGpuDevice; |
| + |
|
robertphillips
2014/05/13 16:24:11
converts -> Converts ?
"skPaint's shader" -> "SkPa
egdaniel
2014/05/13 17:35:54
As of now we always fall back to src-over for the
|
| +// converts a SkPaint to a GrPaint, ignoring the skPaint's shader |
| +// justAlpha indicates that 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. |
| +bool 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. The texture to |
|
robertphillips
2014/05/13 16:24:11
There is no param 'act'
Add "Return true on succes
|
| +// be used is set on grPaint and returned in param act. constantColor has the |
| +// same meaning as in skPaint2GrPaintNoShader. |
| +bool SkPaint2GrPaintShader(SkGpuDevice* dev, const SkPaint& skPaint, |
| + bool constantColor, GrPaint* grPaint); |
| + |
| +//////////////////////////////////////////////////////////////////////////////// |
| // Classes |
| class SkGlyphCache; |