Bug 1727603 - Remove gfxVars::UseOMTP. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D123676
This commit is contained in:
Andrew Osmond 2021-08-25 19:56:01 +00:00
Родитель 1f76d3eab9
Коммит aa22206ca2
13 изменённых файлов: 1 добавлений и 65 удалений

Просмотреть файл

@ -61,7 +61,6 @@ class gfxVarReceiver;
_(ScreenDepth, int32_t, 0) \
_(GREDirectory, nsString, nsString()) \
_(ProfDirectory, nsString, nsString()) \
_(UseOMTP, bool, false) \
_(AllowD3D11KeyedMutex, bool, false) \
_(SystemTextQuality, int32_t, 5 /* CLEARTYPE_QUALITY */) \
_(SystemTextClearTypeLevel, float, 1.0f) \

Просмотреть файл

@ -150,9 +150,6 @@ class MockGfxInfo final : public nsIGfxInfo {
NS_IMETHOD GetUsesTiling(bool* aUsesTiling) override {
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHOD GetContentUsesTiling(bool* aUsesTiling) override {
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHOD GetTargetFrameRate(uint32_t* aTargetFrameRate) override {
return NS_ERROR_NOT_IMPLEMENTED;
}

Просмотреть файл

@ -2862,36 +2862,7 @@ bool gfxPlatform::UsesOffMainThreadCompositing() {
}
bool gfxPlatform::UsesTiling() const {
bool usesSkia = GetDefaultContentBackend() == BackendType::SKIA;
// We can't just test whether the PaintThread is initialized here because
// this function is used when initializing the PaintThread. So instead we
// check the conditions that enable OMTP with parallel painting.
bool usesPOMTP = XRE_IsContentProcess() && gfxVars::UseOMTP() &&
(StaticPrefs::layers_omtp_paint_workers_AtStartup() == -1 ||
StaticPrefs::layers_omtp_paint_workers_AtStartup() > 1);
return StaticPrefs::layers_enable_tiles_AtStartup() ||
(StaticPrefs::layers_enable_tiles_if_skia_pomtp_AtStartup() &&
usesSkia && usesPOMTP);
}
bool gfxPlatform::ContentUsesTiling() const {
BackendPrefsData data = GetBackendPrefs();
BackendType contentBackend = GetContentBackendPref(data.mContentBitmask);
if (contentBackend == BackendType::NONE) {
contentBackend = data.mContentDefault;
}
bool contentUsesSkia = contentBackend == BackendType::SKIA;
bool contentUsesPOMTP =
gfxVars::UseOMTP() &&
(StaticPrefs::layers_omtp_paint_workers_AtStartup() == -1 ||
StaticPrefs::layers_omtp_paint_workers_AtStartup() > 1);
return StaticPrefs::layers_enable_tiles_AtStartup() ||
(StaticPrefs::layers_enable_tiles_if_skia_pomtp_AtStartup() &&
contentUsesSkia && contentUsesPOMTP);
return StaticPrefs::layers_enable_tiles_AtStartup();
}
/***

Просмотреть файл

@ -657,12 +657,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
*/
virtual bool UsesTiling() const;
/**
* Returns whether the content process will use tiling for layers. This is
* only used by about:support.
*/
virtual bool ContentUsesTiling() const;
/**
* Returns a logger if one is available and logging is enabled
*/

Просмотреть файл

@ -236,8 +236,6 @@ bool gfxPlatformMac::UsesTiling() const {
return true;
}
bool gfxPlatformMac::ContentUsesTiling() const { return UsesTiling(); }
bool gfxPlatformMac::CreatePlatformFontList() {
return gfxPlatformFontList::Initialize(new gfxMacPlatformFontList);
}

Просмотреть файл

@ -38,7 +38,6 @@ class gfxPlatformMac : public gfxPlatform {
}
bool UsesTiling() const override;
bool ContentUsesTiling() const override;
already_AddRefed<gfxASurface> CreateOffscreenSurface(
const IntSize& aSize, gfxImageFormat aFormat) override;

Просмотреть файл

@ -6370,15 +6370,6 @@
#endif
mirror: once
- name: layers.enable-tiles-if-skia-pomtp
type: bool
#if defined(XP_WIN)
value: true
#else
value: false
#endif
mirror: once
- name: layers.flash-borders
type: RelaxedAtomicBool
value: false

Просмотреть файл

@ -686,7 +686,6 @@ var snapshotFormatters = {
["windowProtocol", "graphics-window-protocol"],
["desktopEnvironment", "graphics-desktop-environment"],
"usesTiling",
"contentUsesTiling",
"targetFrameRate",
];
for (let feature of featureKeys) {

Просмотреть файл

@ -608,7 +608,6 @@ var dataProviders = {
DWriteVersion: "directWriteVersion",
cleartypeParameters: "clearTypeParameters",
UsesTiling: "usesTiling",
ContentUsesTiling: "contentUsesTiling",
TargetFrameRate: "targetFrameRate",
windowProtocol: null,
desktopEnvironment: null,

Просмотреть файл

@ -620,9 +620,6 @@ const SNAPSHOT_SCHEMA = {
usesTiling: {
type: "boolean",
},
contentUsesTiling: {
type: "boolean",
},
clearTypeParameters: {
type: "string",
},

Просмотреть файл

@ -1801,12 +1801,6 @@ GfxInfoBase::GetUsesTiling(bool* aUsesTiling) {
return NS_OK;
}
NS_IMETHODIMP
GfxInfoBase::GetContentUsesTiling(bool* aUsesTiling) {
*aUsesTiling = gfxPlatform::GetPlatform()->ContentUsesTiling();
return NS_OK;
}
NS_IMETHODIMP
GfxInfoBase::GetTargetFrameRate(uint32_t* aTargetFrameRate) {
*aTargetFrameRate = gfxPlatform::TargetFrameRate();

Просмотреть файл

@ -72,7 +72,6 @@ class GfxInfoBase : public nsIGfxInfo,
NS_IMETHOD GetWebRenderEnabled(bool* aWebRenderEnabled) override;
NS_IMETHOD GetIsHeadless(bool* aIsHeadless) override;
NS_IMETHOD GetUsesTiling(bool* aUsesTiling) override;
NS_IMETHOD GetContentUsesTiling(bool* aUsesTiling) override;
NS_IMETHOD GetTargetFrameRate(uint32_t* aTargetFrameRate) override;
// Non-XPCOM method to get IPC data:

Просмотреть файл

@ -37,7 +37,6 @@ interface nsIGfxInfo : nsISupports
readonly attribute boolean WebRenderEnabled;
readonly attribute boolean isHeadless;
readonly attribute boolean UsesTiling;
readonly attribute boolean ContentUsesTiling;
readonly attribute unsigned long TargetFrameRate;
// XXX: Switch to a list of devices, rather than explicitly numbering them.