зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1719688 - Support turning off the webrender compositor for color management. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D119431
This commit is contained in:
Родитель
7e08b2baf8
Коммит
3cb864a463
|
@ -86,6 +86,18 @@ ExtensionPreferencesManager.addSetting("colorManagement.useNativeSRGB", {
|
|||
},
|
||||
});
|
||||
|
||||
ExtensionPreferencesManager.addSetting(
|
||||
"colorManagement.useWebRenderCompositor",
|
||||
{
|
||||
permission: "browserSettings",
|
||||
prefNames: ["gfx.webrender.compositor"],
|
||||
|
||||
setCallback(value) {
|
||||
return { [this.prefNames[0]]: value };
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
ExtensionPreferencesManager.addSetting("contextMenuShowEvent", {
|
||||
permission: "browserSettings",
|
||||
prefNames: ["ui.context_menus.after_mouseup"],
|
||||
|
@ -488,6 +500,13 @@ this.browserSettings = class extends ExtensionAPI {
|
|||
);
|
||||
},
|
||||
}),
|
||||
useWebRenderCompositor: getSettingsAPI({
|
||||
context,
|
||||
name: "colorManagement.useWebRenderCompositor",
|
||||
callback() {
|
||||
return Services.prefs.getBoolPref("gfx.webrender.compositor");
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
@ -127,6 +127,10 @@
|
|||
"useNativeSRGB": {
|
||||
"$ref": "types.Setting",
|
||||
"description": "This boolean setting controls whether or not native sRGB color management is used."
|
||||
},
|
||||
"useWebRenderCompositor": {
|
||||
"$ref": "types.Setting",
|
||||
"description": "This boolean setting controls whether or not the WebRender compositor is used."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -309,6 +309,13 @@ add_task(async function test_browser_settings() {
|
|||
"gfx.color_management.native_srgb": true,
|
||||
});
|
||||
|
||||
await testSetting("colorManagement.useWebRenderCompositor", false, {
|
||||
"gfx.webrender.compositor": false,
|
||||
});
|
||||
await testSetting("colorManagement.useWebRenderCompositor", true, {
|
||||
"gfx.webrender.compositor": true,
|
||||
});
|
||||
|
||||
await extension.unload();
|
||||
await promiseShutdownManager();
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче