зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1162530 - Part 2: We were not allowing webrtc to be blocklisted in the downloadable scenario at all, expicitly look for unknown OS, and some minor white space changes. r=jrmuizel
This commit is contained in:
Родитель
b39a1b5e61
Коммит
85aee0b062
|
@ -146,6 +146,9 @@ GetPrefNameForFeature(int32_t aFeature)
|
|||
case nsIGfxInfo::FEATURE_STAGEFRIGHT:
|
||||
name = BLACKLIST_PREF_BRANCH "stagefright";
|
||||
break;
|
||||
case nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION:
|
||||
name = BLACKLIST_PREF_BRANCH "webrtc.hw.acceleration";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
@ -332,6 +335,8 @@ BlacklistFeatureToGfxFeature(const nsAString& aFeature)
|
|||
return nsIGfxInfo::FEATURE_WEBGL_MSAA;
|
||||
else if (aFeature.EqualsLiteral("STAGEFRIGHT"))
|
||||
return nsIGfxInfo::FEATURE_STAGEFRIGHT;
|
||||
else if (aFeature.EqualsLiteral("WEBRTC_HW_ACCELERATION"))
|
||||
return nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -675,11 +680,12 @@ GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray<GfxDriverInfo>& info,
|
|||
uint32_t i = 0;
|
||||
for (; i < info.Length(); i++) {
|
||||
// Do the operating system check first, no point in getting the driver
|
||||
// info if we won't need to use it. Note that this also catches the
|
||||
// info if we won't need to use it. Note we also catch and skips the
|
||||
// application version mismatches that would leave operating system
|
||||
// set to unknown.
|
||||
if (info[i].mOperatingSystem != DRIVER_OS_ALL &&
|
||||
info[i].mOperatingSystem != os)
|
||||
if (info[i].mOperatingSystem == DRIVER_OS_UNKNOWN ||
|
||||
(info[i].mOperatingSystem != DRIVER_OS_ALL &&
|
||||
info[i].mOperatingSystem != os))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -934,6 +940,7 @@ GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray<GfxDriverInfo>& aDriverInfo)
|
|||
nsIGfxInfo::FEATURE_WEBGL_ANGLE,
|
||||
nsIGfxInfo::FEATURE_WEBGL_MSAA,
|
||||
nsIGfxInfo::FEATURE_STAGEFRIGHT,
|
||||
nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION,
|
||||
0
|
||||
};
|
||||
|
||||
|
@ -991,8 +998,8 @@ GfxInfoBase::LogFailure(const nsACString &failure)
|
|||
/* void getFailures (out unsigned long failureCount, [optional, array, size_is (failureCount)] out long indices, [array, size_is (failureCount), retval] out string failures); */
|
||||
/* XPConnect method of returning arrays is very ugly. Would not recommend. */
|
||||
NS_IMETHODIMP GfxInfoBase::GetFailures(uint32_t* failureCount,
|
||||
int32_t** indices,
|
||||
char ***failures)
|
||||
int32_t** indices,
|
||||
char ***failures)
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
|
||||
|
@ -1043,7 +1050,7 @@ NS_IMETHODIMP GfxInfoBase::GetFailures(uint32_t* failureCount,
|
|||
if (!(*failures)[i]) {
|
||||
/* <sarcasm> I'm too afraid to use an inline function... </sarcasm> */
|
||||
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(i, (*failures));
|
||||
*failureCount = i;
|
||||
*failureCount = i;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче