| Index: src/gpu/GrContext.cpp
|
| diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
|
| index 4235ae85524ab36d9ffc4426d0e00a3d4548aa33..443494073af596a9ac0f9fee05d49be897d7478c 100644
|
| --- a/src/gpu/GrContext.cpp
|
| +++ b/src/gpu/GrContext.cpp
|
| @@ -550,9 +550,12 @@
|
| }
|
|
|
| GrPaint paint;
|
| - paint.addColorTextureProcessor(src, GrCoordTransform::MakeDivByTextureWHMatrix(src));
|
| - if (!SkScalarNearlyEqual(gamma, 1.0f)) {
|
| - paint.addColorFragmentProcessor(GrGammaEffect::Create(gamma))->unref();
|
| + if (SkScalarNearlyEqual(gamma, 1.0f)) {
|
| + paint.addColorTextureProcessor(src, GrCoordTransform::MakeDivByTextureWHMatrix(src));
|
| + } else {
|
| + SkAutoTUnref<const GrFragmentProcessor> fp;
|
| + fp.reset(GrGammaEffect::Create(src, gamma));
|
| + paint.addColorFragmentProcessor(fp);
|
| }
|
| paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
|
| paint.setGammaCorrect(true);
|
|
|