| Index: src/gpu/GrSWMaskHelper.cpp
|
| diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
|
| index c80a13ccd02aafa76e1184e2a075b0dd27cf6b8d..5a31e9466b939cdc67626c53996fb716bcc7bbdc 100644
|
| --- a/src/gpu/GrSWMaskHelper.cpp
|
| +++ b/src/gpu/GrSWMaskHelper.cpp
|
| @@ -12,6 +12,7 @@
|
| #include "GrGpu.h"
|
|
|
| #include "SkData.h"
|
| +#include "SkDistanceFieldGen.h"
|
| #include "SkStrokeRec.h"
|
|
|
| // TODO: try to remove this #include
|
| @@ -306,6 +307,17 @@ void GrSWMaskHelper::toTexture(GrTexture *texture) {
|
| }
|
| }
|
|
|
| +/**
|
| + * Convert mask generation results to an SDF
|
| + */
|
| +void GrSWMaskHelper::toSDF(void* sdf) {
|
| + SkAutoLockPixels alp(fBM);
|
| +
|
| + SkGenerateDistanceFieldFromA8Image((unsigned char*)sdf,
|
| + (const unsigned char*)fBM.getPixels(),
|
| + fBM.width(), fBM.height(), fBM.rowBytes());
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| /**
|
| * Software rasterizes path to A8 mask (possibly using the context's matrix)
|
|
|