Bug 1543359 - P12. Fix colorspace rendering with IOSurface and basic compositor. r=mattwoodrow

It got missed in bug 1540581.

Differential Revision: https://phabricator.services.mozilla.com/D27248

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jean-Yves Avenard 2019-07-26 08:45:40 +00:00
parent 4bf7d9afd7
commit 2118adec3f

View File

@ -83,6 +83,9 @@ CreateSourceSurfaceFromLockedMacIOSurface(MacIOSurface* aSurface) {
data.mCbCrStride = cbCrWidth;
data.mCbCrSize = IntSize::Truncate(cbCrWidth, cbCrHeight);
data.mPicSize = data.mYSize;
data.mYUVColorSpace = aSurface->GetYUVColorSpace();
data.mColorRange = aSurface->IsFullRange() ? gfx::ColorRange::FULL
: gfx::ColorRange::LIMITED;
ConvertYCbCrToRGB(data, SurfaceFormat::B8G8R8X8,
IntSize::Truncate(ioWidth, ioHeight), mappedSurface.mData,