Issue #2101 - Part 7: Add color range support on GPUs

This commit is contained in:
u3shit 2023-02-25 00:29:56 +01:00 committed by roytam1
commit 687733f9d1
18 changed files with 106 additions and 74 deletions

View file

@ -828,6 +828,16 @@ BufferTextureHost::GetYUVColorSpace() const
return YUVColorSpace::UNKNOWN;
}
ColorRange
BufferTextureHost::GetColorRange() const
{
if (mFormat == gfx::SurfaceFormat::YUV) {
const YCbCrDescriptor& desc = mDescriptor.get_YCbCrDescriptor();
return desc.colorRange();
}
return ColorRange::UNKNOWN;
}
bool
BufferTextureHost::MaybeUpload(nsIntRegion *aRegion)
{