Bug 1909372 - Remove WebGLContextAttributes.colorSpace. r=gfx-reviewers,webidl,lsalzman,saschanaz
The WebGL spec never added this, and WebGL expects this to change via drawingBufferColorSpace, so I don't think we should push for a spec addition for .colorSpace. Differential Revision: https://phabricator.services.mozilla.com/D217350
This commit is contained in:
@@ -741,16 +741,7 @@ void ClientWebGLContext::GetCanvas(
|
||||
void ClientWebGLContext::SetDrawingBufferColorSpace(
|
||||
const dom::PredefinedColorSpace val) {
|
||||
mDrawingBufferColorSpace = val;
|
||||
|
||||
// Just in case, update in Options too.
|
||||
// Why not treat our WebGLContextOptions as the source of truth? Well,
|
||||
// mNotLost is lost on context-loss, so we'd lose any setting we had here if
|
||||
// that happens.
|
||||
if (mNotLost) {
|
||||
mNotLost->info.options.colorSpace = mDrawingBufferColorSpace;
|
||||
}
|
||||
|
||||
Run<RPROC(SetDrawingBufferColorSpace)>(mDrawingBufferColorSpace);
|
||||
Run<RPROC(SetDrawingBufferColorSpace)>(*mDrawingBufferColorSpace);
|
||||
}
|
||||
|
||||
void ClientWebGLContext::GetContextAttributes(
|
||||
@@ -1075,9 +1066,6 @@ ClientWebGLContext::SetContextOptions(JSContext* cx,
|
||||
if (attributes.mAntialias.WasPassed()) {
|
||||
newOpts.antialias = attributes.mAntialias.Value();
|
||||
}
|
||||
if (attributes.mColorSpace.WasPassed()) {
|
||||
newOpts.colorSpace = attributes.mColorSpace.Value();
|
||||
}
|
||||
|
||||
// Don't do antialiasing if we've disabled MSAA.
|
||||
if (!StaticPrefs::webgl_msaa_samples()) {
|
||||
|
||||
Reference in New Issue
Block a user