diff options
author | 2017-08-11 09:40:37 -0400 | |
---|---|---|
committer | 2017-08-11 14:13:26 +0000 | |
commit | aff329b8e9b239bca1d93b13a914fbef45ccf7fe (patch) | |
tree | 06ba42a557c6695f145bcf4956c981fc87af55ff /src/gpu/GrYUVProvider.cpp | |
parent | e2cbd0451832ec71d1b498e0f64d02b7d096b2b7 (diff) |
Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrYUVProvider.cpp')
-rw-r--r-- | src/gpu/GrYUVProvider.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp index 12390aaab0..6b58d42cd7 100644 --- a/src/gpu/GrYUVProvider.cpp +++ b/src/gpu/GrYUVProvider.cpp @@ -134,11 +134,11 @@ sk_sp<GrTextureProxy> GrYUVProvider::refAsTextureProxy(GrContext* ctx, const GrS } GrPaint paint; - sk_sp<GrFragmentProcessor> yuvToRgbProcessor( - GrYUVEffect::MakeYUVToRGB(yuvTextureContexts[0]->asTextureProxyRef(), - yuvTextureContexts[1]->asTextureProxyRef(), - yuvTextureContexts[2]->asTextureProxyRef(), - yuvInfo.fSizeInfo.fSizes, yuvInfo.fColorSpace, false)); + auto yuvToRgbProcessor = + GrYUVEffect::MakeYUVToRGB(yuvTextureContexts[0]->asTextureProxyRef(), + yuvTextureContexts[1]->asTextureProxyRef(), + yuvTextureContexts[2]->asTextureProxyRef(), + yuvInfo.fSizeInfo.fSizes, yuvInfo.fColorSpace, false); paint.addColorFragmentProcessor(std::move(yuvToRgbProcessor)); // If we're decoding an sRGB image, the result of our linear math on the YUV planes is already @@ -158,10 +158,10 @@ sk_sp<GrTextureProxy> GrYUVProvider::refAsTextureProxy(GrContext* ctx, const GrS // If the caller expects the pixels in a different color space than the one from the image, // apply a color conversion to do this. - sk_sp<GrFragmentProcessor> colorConversionProcessor = + std::unique_ptr<GrFragmentProcessor> colorConversionProcessor = GrNonlinearColorSpaceXformEffect::Make(srcColorSpace, dstColorSpace); if (colorConversionProcessor) { - paint.addColorFragmentProcessor(colorConversionProcessor); + paint.addColorFragmentProcessor(std::move(colorConversionProcessor)); } paint.setPorterDuffXPFactory(SkBlendMode::kSrc); |