diff --git a/widget/GfxDriverInfo.cpp b/widget/GfxDriverInfo.cpp index edc0fbed8cfa..e3c94fec2f07 100644 --- a/widget/GfxDriverInfo.cpp +++ b/widget/GfxDriverInfo.cpp @@ -14,8 +14,8 @@ int32_t GfxDriverInfo::allFeatures = 0; uint64_t GfxDriverInfo::allDriverVersions = ~(uint64_t(0)); GfxDeviceFamily* const GfxDriverInfo::allDevices = nullptr; -GfxDeviceFamily* GfxDriverInfo::mDeviceFamilies[DeviceFamilyMax]; -nsAString* GfxDriverInfo::mDeviceVendors[DeviceVendorMax]; +GfxDeviceFamily* GfxDriverInfo::sDeviceFamilies[DeviceFamilyMax]; +nsAString* GfxDriverInfo::sDeviceVendors[DeviceVendorMax]; GfxDriverInfo::GfxDriverInfo() : mOperatingSystem(OperatingSystem::Unknown), @@ -99,11 +99,11 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) NS_ASSERTION(id >= 0 && id < DeviceFamilyMax, "DeviceFamily id is out of range"); // If it already exists, we must have processed it once, so return it now. - if (mDeviceFamilies[id]) - return mDeviceFamilies[id]; + if (sDeviceFamilies[id]) + return sDeviceFamilies[id]; - mDeviceFamilies[id] = new GfxDeviceFamily; - GfxDeviceFamily* deviceFamily = mDeviceFamilies[id]; + sDeviceFamilies[id] = new GfxDeviceFamily; + GfxDeviceFamily* deviceFamily = sDeviceFamilies[id]; switch (id) { case IntelGMA500: @@ -332,17 +332,17 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) // Macro for assigning a device vendor id to a string. #define DECLARE_VENDOR_ID(name, deviceId) \ case name: \ - mDeviceVendors[id]->AssignLiteral(deviceId); \ + sDeviceVendors[id]->AssignLiteral(deviceId); \ break; const nsAString& GfxDriverInfo::GetDeviceVendor(DeviceVendor id) { NS_ASSERTION(id >= 0 && id < DeviceVendorMax, "DeviceVendor id is out of range"); - if (mDeviceVendors[id]) - return *mDeviceVendors[id]; + if (sDeviceVendors[id]) + return *sDeviceVendors[id]; - mDeviceVendors[id] = new nsString(); + sDeviceVendors[id] = new nsString(); switch (id) { DECLARE_VENDOR_ID(VendorAll, ""); @@ -359,5 +359,5 @@ const nsAString& GfxDriverInfo::GetDeviceVendor(DeviceVendor id) DECLARE_VENDOR_ID(DeviceVendorMax, ""); } - return *mDeviceVendors[id]; + return *sDeviceVendors[id]; } diff --git a/widget/GfxDriverInfo.h b/widget/GfxDriverInfo.h index a8c4bfa2e2f2..ef24d9eada2f 100644 --- a/widget/GfxDriverInfo.h +++ b/widget/GfxDriverInfo.h @@ -10,9 +10,9 @@ // Macros for adding a blocklist item to the static list. #define APPEND_TO_DRIVER_BLOCKLIST(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion) \ - mDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion)) + sDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion)) #define APPEND_TO_DRIVER_BLOCKLIST2(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId) \ - mDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId)) + sDriverInfo->AppendElement(GfxDriverInfo(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId)) #define APPEND_TO_DRIVER_BLOCKLIST_RANGE(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, driverVersionMax, ruleId, suggestedVersion) \ do { \ @@ -21,7 +21,7 @@ driverComparator == DRIVER_BETWEEN_INCLUSIVE_START); \ GfxDriverInfo info(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion); \ info.mDriverVersionMax = driverVersionMax; \ - mDriverInfo->AppendElement(info); \ + sDriverInfo->AppendElement(info); \ } while (false) #define APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, driverVersionMax, ruleId, suggestedVersion) \ @@ -31,7 +31,7 @@ driverComparator == DRIVER_BETWEEN_INCLUSIVE_START); \ GfxDriverInfo info(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion, false, true); \ info.mDriverVersionMax = driverVersionMax; \ - mDriverInfo->AppendElement(info); \ + sDriverInfo->AppendElement(info); \ } while (false) @@ -161,10 +161,10 @@ struct GfxDriverInfo nsCString mRuleId; static const GfxDeviceFamily* GetDeviceFamily(DeviceFamily id); - static GfxDeviceFamily* mDeviceFamilies[DeviceFamilyMax]; + static GfxDeviceFamily* sDeviceFamilies[DeviceFamilyMax]; static const nsAString& GetDeviceVendor(DeviceVendor id); - static nsAString* mDeviceVendors[DeviceVendorMax]; + static nsAString* sDeviceVendors[DeviceVendorMax]; nsString mModel, mHardware, mProduct, mManufacturer; diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp index d407acb3e611..0638717e3b96 100644 --- a/widget/GfxInfoBase.cpp +++ b/widget/GfxInfoBase.cpp @@ -39,10 +39,10 @@ using namespace mozilla::widget; using namespace mozilla; using mozilla::MutexAutoLock; -nsTArray* GfxInfoBase::mDriverInfo; -nsTArray* GfxInfoBase::mFeatureStatus; -bool GfxInfoBase::mDriverInfoObserverInitialized; -bool GfxInfoBase::mShutdownOccurred; +nsTArray* GfxInfoBase::sDriverInfo; +nsTArray* GfxInfoBase::sFeatureStatus; +bool GfxInfoBase::sDriverInfoObserverInitialized; +bool GfxInfoBase::sShutdownOccurred; // Observes for shutdown so that the child GfxDriverInfo list is freed. class ShutdownObserver : public nsIObserver @@ -59,23 +59,23 @@ public: { MOZ_ASSERT(strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0); - delete GfxInfoBase::mDriverInfo; - GfxInfoBase::mDriverInfo = nullptr; + delete GfxInfoBase::sDriverInfo; + GfxInfoBase::sDriverInfo = nullptr; - delete GfxInfoBase::mFeatureStatus; - GfxInfoBase::mFeatureStatus = nullptr; + delete GfxInfoBase::sFeatureStatus; + GfxInfoBase::sFeatureStatus = nullptr; for (uint32_t i = 0; i < DeviceFamilyMax; i++) { - delete GfxDriverInfo::mDeviceFamilies[i]; - GfxDriverInfo::mDeviceFamilies[i] = nullptr; + delete GfxDriverInfo::sDeviceFamilies[i]; + GfxDriverInfo::sDeviceFamilies[i] = nullptr; } for (uint32_t i = 0; i < DeviceVendorMax; i++) { - delete GfxDriverInfo::mDeviceVendors[i]; - GfxDriverInfo::mDeviceVendors[i] = nullptr; + delete GfxDriverInfo::sDeviceVendors[i]; + GfxDriverInfo::sDeviceVendors[i] = nullptr; } - GfxInfoBase::mShutdownOccurred = true; + GfxInfoBase::sShutdownOccurred = true; return NS_OK; } @@ -85,10 +85,10 @@ NS_IMPL_ISUPPORTS(ShutdownObserver, nsIObserver) void InitGfxDriverInfoShutdownObserver() { - if (GfxInfoBase::mDriverInfoObserverInitialized) + if (GfxInfoBase::sDriverInfoObserverInitialized) return; - GfxInfoBase::mDriverInfoObserverInitialized = true; + GfxInfoBase::sDriverInfoObserverInitialized = true; nsCOMPtr observerService = services::GetObserverService(); if (!observerService) { @@ -634,9 +634,9 @@ GfxInfoBase::GetFeatureStatus(int32_t aFeature, nsACString& aFailureId, int32_t* if (XRE_IsContentProcess()) { // Use the cached data received from the parent process. - MOZ_ASSERT(mFeatureStatus); + MOZ_ASSERT(sFeatureStatus); bool success = false; - for (const auto& fs : *mFeatureStatus) { + for (const auto& fs : *sFeatureStatus) { if (fs.feature() == aFeature) { aFailureId = fs.failureId(); *aStatus = fs.status(); @@ -889,8 +889,8 @@ GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray& info, void GfxInfoBase::SetFeatureStatus(const nsTArray& aFS) { - MOZ_ASSERT(!mFeatureStatus); - mFeatureStatus = new nsTArray(aFS); + MOZ_ASSERT(!sFeatureStatus); + sFeatureStatus = new nsTArray(aFS); } nsresult @@ -912,7 +912,7 @@ GfxInfoBase::GetFeatureStatusImpl(int32_t aFeature, return NS_OK; } - if (mShutdownOccurred) { + if (sShutdownOccurred) { // This is futile; we've already commenced shutdown and our blocklists have // been deleted. We may want to look into resurrecting the blocklist instead // but for now, just don't even go there. @@ -943,8 +943,8 @@ GfxInfoBase::GetFeatureStatusImpl(int32_t aFeature, if (aDriverInfo.Length()) { status = FindBlocklistedDeviceInList(aDriverInfo, aSuggestedVersion, aFeature, aFailureId, os); } else { - if (!mDriverInfo) { - mDriverInfo = new nsTArray(); + if (!sDriverInfo) { + sDriverInfo = new nsTArray(); } status = FindBlocklistedDeviceInList(GetGfxDriverInfo(), aSuggestedVersion, aFeature, aFailureId, os); } diff --git a/widget/GfxInfoBase.h b/widget/GfxInfoBase.h index 24ed49a70361..774f3fbd4a97 100644 --- a/widget/GfxInfoBase.h +++ b/widget/GfxInfoBase.h @@ -81,10 +81,10 @@ public: static void AddCollector(GfxInfoCollectorBase* collector); static void RemoveCollector(GfxInfoCollectorBase* collector); - static nsTArray* mDriverInfo; - static nsTArray* mFeatureStatus; - static bool mDriverInfoObserverInitialized; - static bool mShutdownOccurred; + static nsTArray* sDriverInfo; + static nsTArray* sFeatureStatus; + static bool sDriverInfoObserverInitialized; + static bool sShutdownOccurred; virtual nsString Model() { return EmptyString(); } virtual nsString Hardware() { return EmptyString(); } diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp index 6d48a88c57c5..cb4223ae1a5b 100644 --- a/widget/GfxInfoX11.cpp +++ b/widget/GfxInfoX11.cpp @@ -260,10 +260,10 @@ const nsTArray& GfxInfo::GetGfxDriverInfo() { // Nothing here yet. - //if (!mDriverInfo->Length()) { + //if (!sDriverInfo->Length()) { // //} - return *mDriverInfo; + return *sDriverInfo; } nsresult @@ -282,7 +282,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (aOS) *aOS = os; - if (mShutdownOccurred) { + if (sShutdownOccurred) { return NS_OK; } diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp index 4fc2c0919447..6670693b4308 100644 --- a/widget/android/GfxInfo.cpp +++ b/widget/android/GfxInfo.cpp @@ -366,7 +366,7 @@ GfxInfo::AddCrashReportAnnotations() const nsTArray& GfxInfo::GetGfxDriverInfo() { - if (mDriverInfo->IsEmpty()) { + if (sDriverInfo->IsEmpty()) { APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Android, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAll), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_STATUS_OK, @@ -374,7 +374,7 @@ GfxInfo::GetGfxDriverInfo() "FEATURE_OK_FORCE_OPENGL" ); } - return *mDriverInfo; + return *sDriverInfo; } nsresult @@ -392,7 +392,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (aOS) *aOS = os; - if (mShutdownOccurred) { + if (sShutdownOccurred) { return NS_OK; } diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm index bf6092488bea..c923509a4647 100644 --- a/widget/cocoa/GfxInfo.mm +++ b/widget/cocoa/GfxInfo.mm @@ -309,7 +309,7 @@ GfxInfo::AddCrashReportAnnotations() const nsTArray& GfxInfo::GetGfxDriverInfo() { - if (!mDriverInfo->Length()) { + if (!sDriverInfo->Length()) { IMPLEMENT_MAC_DRIVER_BLOCKLIST(OperatingSystem::OSX, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_MSAA, nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION, "FEATURE_FAILURE_MAC_ATI_NO_MSAA"); @@ -320,7 +320,7 @@ GfxInfo::GetGfxDriverInfo() (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(Geforce7300GT), nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, "FEATURE_FAILURE_MAC_7300_NO_WEBGL"); } - return *mDriverInfo; + return *sDriverInfo; } nsresult @@ -338,7 +338,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (aOS) *aOS = os; - if (mShutdownOccurred) { + if (sShutdownOccured) { return NS_OK; } diff --git a/widget/uikit/GfxInfo.cpp b/widget/uikit/GfxInfo.cpp index cabe993dd06f..1d5cee05e8af 100644 --- a/widget/uikit/GfxInfo.cpp +++ b/widget/uikit/GfxInfo.cpp @@ -152,14 +152,14 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) const nsTArray& GfxInfo::GetGfxDriverInfo() { - if (mDriverInfo->IsEmpty()) { + if (sDriverInfo->IsEmpty()) { APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Ios, (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAll), GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_STATUS_OK, DRIVER_COMPARISON_IGNORED, GfxDriverInfo::allDriverVersions ); } - return *mDriverInfo; + return *sDriverInfo; } nsresult @@ -175,7 +175,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (aOS) *aOS = OperatingSystem::Ios; - if (mShutdownOccurred) { + if (sShutdownOccured) { return NS_OK; } diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index 409c428b493f..6c2aaa3ec21e 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -1010,7 +1010,7 @@ DetectBrokenAVX() const nsTArray& GfxInfo::GetGfxDriverInfo() { - if (!mDriverInfo->Length()) { + if (!sDriverInfo->Length()) { /* * It should be noted here that more specialized rules on certain features * should be inserted -before- more generalized restriction. As the first @@ -1435,7 +1435,7 @@ GfxInfo::GetGfxDriverInfo() nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_UNQUALIFIED_WEBRENDER_NVIDIA_8_1"); } - return *mDriverInfo; + return *sDriverInfo; } nsresult @@ -1453,7 +1453,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, if (aOS) *aOS = os; - if (mShutdownOccurred) { + if (sShutdownOccured) { return NS_OK; }