aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrYUVEffect.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-08-11 09:40:37 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-11 14:13:26 +0000
commitaff329b8e9b239bca1d93b13a914fbef45ccf7fe (patch)
tree06ba42a557c6695f145bcf4956c981fc87af55ff /src/gpu/effects/GrYUVEffect.h
parente2cbd0451832ec71d1b498e0f64d02b7d096b2b7 (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/effects/GrYUVEffect.h')
-rw-r--r--src/gpu/effects/GrYUVEffect.h54
1 files changed, 30 insertions, 24 deletions
diff --git a/src/gpu/effects/GrYUVEffect.h b/src/gpu/effects/GrYUVEffect.h
index ae62a16562..2ea41bf13c 100644
--- a/src/gpu/effects/GrYUVEffect.h
+++ b/src/gpu/effects/GrYUVEffect.h
@@ -18,32 +18,38 @@ namespace GrYUVEffect {
* Creates an effect that performs color conversion from YUV to RGB. The input textures are
* assumed to be kA8_GrPixelConfig.
*/
- sk_sp<GrFragmentProcessor> MakeYUVToRGB(sk_sp<GrTextureProxy> yProxy,
- sk_sp<GrTextureProxy> uProxy,
- sk_sp<GrTextureProxy> vProxy, const SkISize sizes[3],
- SkYUVColorSpace colorSpace, bool nv12);
+std::unique_ptr<GrFragmentProcessor> MakeYUVToRGB(sk_sp<GrTextureProxy> yProxy,
+ sk_sp<GrTextureProxy> uProxy,
+ sk_sp<GrTextureProxy> vProxy,
+ const SkISize sizes[3],
+ SkYUVColorSpace colorSpace, bool nv12);
- /**
- * Creates a processor that performs color conversion from the passed in processor's RGB
- * channels to Y, U ,and V channels. The output color is (y, u, v, a) where a is the passed in
- * processor's alpha output.
- */
- sk_sp<GrFragmentProcessor> MakeRGBToYUV(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
+/**
+ * Creates a processor that performs color conversion from the passed in processor's RGB
+ * channels to Y, U ,and V channels. The output color is (y, u, v, a) where a is the passed in
+ * processor's alpha output.
+ */
+std::unique_ptr<GrFragmentProcessor> MakeRGBToYUV(std::unique_ptr<GrFragmentProcessor>,
+ SkYUVColorSpace);
- /**
- * Creates a processor that performs color conversion from the passed in processor's RGB
- * channels to U and V channels. The output color is (u, v, 0, a) where a is the passed in
- * processor's alpha output.
- */
- sk_sp<GrFragmentProcessor> MakeRGBToUV(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
- /**
- * Creates a processor that performs color conversion from the passed in fragment processors's
- * RGB channels to Y, U, or V (replicated across all four output color channels). The alpha
- * output of the passed in fragment processor is ignored.
- */
- sk_sp<GrFragmentProcessor> MakeRGBToY(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
- sk_sp<GrFragmentProcessor> MakeRGBToU(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
- sk_sp<GrFragmentProcessor> MakeRGBToV(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
+/**
+ * Creates a processor that performs color conversion from the passed in processor's RGB
+ * channels to U and V channels. The output color is (u, v, 0, a) where a is the passed in
+ * processor's alpha output.
+ */
+std::unique_ptr<GrFragmentProcessor> MakeRGBToUV(std::unique_ptr<GrFragmentProcessor>,
+ SkYUVColorSpace);
+/**
+ * Creates a processor that performs color conversion from the passed in fragment processors's
+ * RGB channels to Y, U, or V (replicated across all four output color channels). The alpha
+ * output of the passed in fragment processor is ignored.
+ */
+std::unique_ptr<GrFragmentProcessor> MakeRGBToY(std::unique_ptr<GrFragmentProcessor>,
+ SkYUVColorSpace);
+std::unique_ptr<GrFragmentProcessor> MakeRGBToU(std::unique_ptr<GrFragmentProcessor>,
+ SkYUVColorSpace);
+std::unique_ptr<GrFragmentProcessor> MakeRGBToV(std::unique_ptr<GrFragmentProcessor>,
+ SkYUVColorSpace);
};
#endif