Bug 1703654 - Prototype display-p3 for WebGL canvas. r=lsalzman,emilio

Enable (direct) external surface compositing for MacIOSurfaces.
Works on Mac.

Differential Revision: https://phabricator.services.mozilla.com/D144073
This commit is contained in:
Kelsey Gilbert
2022-04-26 16:54:17 +00:00
parent 4fcd8d8133
commit a1ae24e00c
16 changed files with 130 additions and 17 deletions

View File

@@ -837,11 +837,19 @@ ClientWebGLContext::SetContextOptions(JSContext* cx,
newOpts.antialias = attributes.mAntialias.Value();
}
if (attributes.mColorSpace.WasPassed()) {
newOpts.colorSpace = Some(attributes.mColorSpace.Value());
} else if (StaticPrefs::gfx_color_management_native_srgb()) {
newOpts.colorSpace = Some(dom::PredefinedColorSpace::Srgb);
}
// Don't do antialiasing if we've disabled MSAA.
if (!StaticPrefs::webgl_msaa_samples()) {
newOpts.antialias = false;
}
// -
if (mInitialOptions && *mInitialOptions != newOpts) {
// Err if the options asked for aren't the same as what they were
// originally.