diff options
author | 2016-06-09 13:24:48 -0700 | |
---|---|---|
committer | 2016-06-09 13:24:48 -0700 | |
commit | b445a57e6c36cce86580b618701b5af708a6f271 (patch) | |
tree | f10496b811261c9c3a4e5b18de5deb6543fb9715 /src/gpu/GrYUVProvider.cpp | |
parent | 9a3fbf7e559ca59a7b67a62be743496da1e31724 (diff) |
Add NV12 texture conversion support.
If textures 1 and 2 passed into MakeFromYUVTexturesCopy are the same,
then treat the input as NV12 and sample from the g component of texture
2.
BUG=skia:5209
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2016593002
Review-Url: https://codereview.chromium.org/2016593002
Diffstat (limited to 'src/gpu/GrYUVProvider.cpp')
-rw-r--r-- | src/gpu/GrYUVProvider.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp index b30ff1fa3c..c35f57a68f 100644 --- a/src/gpu/GrYUVProvider.cpp +++ b/src/gpu/GrYUVProvider.cpp @@ -121,11 +121,9 @@ sk_sp<GrTexture> GrYUVProvider::refAsTexture(GrContext* ctx, } GrPaint paint; - sk_sp<GrFragmentProcessor> yuvToRgbProcessor(GrYUVEffect::MakeYUVToRGB(yuvTextures[0], - yuvTextures[1], - yuvTextures[2], - yuvInfo.fSizeInfo.fSizes, - yuvInfo.fColorSpace)); + sk_sp<GrFragmentProcessor> yuvToRgbProcessor( + GrYUVEffect::MakeYUVToRGB(yuvTextures[0], yuvTextures[1], yuvTextures[2], + 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 |