New version of SkImage::MakeFromYUVAPixmaps()
Takes SkYUVAPixmaps. Still implemented in terms of SkYUVAIndex[4]
internally.
Replace all internal use cases except wacky_yuv_formats.
Takes GrRecordingContext rather than GrContext.
SkVideoDecoder updated to take GrRecordingContext.
Bug: skia:10632
Change-Id: I6e9b9b6a4f11333bce6f87c1ebff0acb297f6540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316837
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/tools/gpu/YUVUtils.cpp b/tools/gpu/YUVUtils.cpp
index 87ce712..c2e2288 100644
--- a/tools/gpu/YUVUtils.cpp
+++ b/tools/gpu/YUVUtils.cpp
@@ -75,14 +75,7 @@
return true; // Have already made a YUV image valid for this context.
}
// Try to make a new YUV image for this context.
- fYUVImage = SkImage::MakeFromYUVAPixmaps(rContext,
- fPixmaps.yuvaInfo().yuvColorSpace(),
- fPixmaps.planes().data(),
- fComponents,
- fSizeInfo.fSizes[0],
- kTopLeft_GrSurfaceOrigin,
- static_cast<bool>(fMipmapped),
- false);
+ fYUVImage = SkImage::MakeFromYUVAPixmaps(rContext, fPixmaps, fMipmapped, false, nullptr);
return fYUVImage != nullptr;
}