| Index: src/gpu/GrYUVProvider.cpp
|
| diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp
|
| index a7281da27b2e740ffafdea57aa8a0043b74c8193..b30ff1fa3ce9434c469014d869943570d0c3b42d 100644
|
| --- a/src/gpu/GrYUVProvider.cpp
|
| +++ b/src/gpu/GrYUVProvider.cpp
|
| @@ -121,13 +121,12 @@ sk_sp<GrTexture> GrYUVProvider::refAsTexture(GrContext* ctx,
|
| }
|
|
|
| GrPaint paint;
|
| - SkAutoTUnref<const GrFragmentProcessor> yuvToRgbProcessor(
|
| - GrYUVEffect::CreateYUVToRGB(yuvTextures[0],
|
| - yuvTextures[1],
|
| - yuvTextures[2],
|
| - yuvInfo.fSizeInfo.fSizes,
|
| - yuvInfo.fColorSpace));
|
| - paint.addColorFragmentProcessor(yuvToRgbProcessor);
|
| + sk_sp<GrFragmentProcessor> yuvToRgbProcessor(GrYUVEffect::MakeYUVToRGB(yuvTextures[0],
|
| + yuvTextures[1],
|
| + yuvTextures[2],
|
| + yuvInfo.fSizeInfo.fSizes,
|
| + yuvInfo.fColorSpace));
|
| + paint.addColorFragmentProcessor(std::move(yuvToRgbProcessor));
|
|
|
| // If we're decoding an sRGB image, the result of our linear math on the YUV planes is already
|
| // in sRGB. (The encoding is just math on bytes, with no concept of color spaces.) So, we need
|
| @@ -139,7 +138,7 @@ sk_sp<GrTexture> GrYUVProvider::refAsTexture(GrContext* ctx,
|
| if (ctx->caps()->srgbWriteControl()) {
|
| paint.setDisableOutputConversionToSRGB(true);
|
| } else {
|
| - paint.addColorFragmentProcessor(GrGammaEffect::Create(2.2f))->unref();
|
| + paint.addColorFragmentProcessor(GrGammaEffect::Make(2.2f));
|
| }
|
| }
|
|
|
|
|