diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 8818dc0b06..563dde74e2 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -22,6 +22,7 @@ #include "SkGpuDeviceFactory.h" #include "SkGrTexturePixelRef.h" +#include "SkColorFilter.h" #include "SkDrawProcs.h" #include "SkGlyphCache.h" #include "SkUtils.h" @@ -368,6 +369,15 @@ bool SkGpuDevice::skPaint2GrPaintNoShader(const SkPaint& skPaint, grPaint->fColor = SkGr::SkColor2GrColor(skPaint.getColor()); grPaint->setTexture(NULL); } + SkColorFilter* colorFilter = skPaint.getColorFilter(); + SkColor color; + SkXfermode::Mode filterMode; + if (colorFilter != NULL && colorFilter->asColorMode(&color, &filterMode)) { + grPaint->fColorFilterColor = SkGr::SkColor2GrColor(color); + grPaint->fColorFilterXfermode = filterMode; + } else { + grPaint->resetColorFilter(); + } return true; } |