зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1162299 - Distinguish between all features and unrecognized feature. r=kats
--HG-- extra : rebase_source : 964896852d223f4b4e69b53acf1084d11b96a247
This commit is contained in:
Родитель
2db0cddf1f
Коммит
9967502c82
|
@ -311,6 +311,7 @@ BlacklistDevicesToDeviceFamily(nsIDOMHTMLCollection* aDevices)
|
||||||
static int32_t
|
static int32_t
|
||||||
BlacklistFeatureToGfxFeature(const nsAString& aFeature)
|
BlacklistFeatureToGfxFeature(const nsAString& aFeature)
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(!aFeature.IsEmpty());
|
||||||
if (aFeature.EqualsLiteral("DIRECT2D"))
|
if (aFeature.EqualsLiteral("DIRECT2D"))
|
||||||
return nsIGfxInfo::FEATURE_DIRECT2D;
|
return nsIGfxInfo::FEATURE_DIRECT2D;
|
||||||
else if (aFeature.EqualsLiteral("DIRECT3D_9_LAYERS"))
|
else if (aFeature.EqualsLiteral("DIRECT3D_9_LAYERS"))
|
||||||
|
@ -337,7 +338,13 @@ BlacklistFeatureToGfxFeature(const nsAString& aFeature)
|
||||||
return nsIGfxInfo::FEATURE_STAGEFRIGHT;
|
return nsIGfxInfo::FEATURE_STAGEFRIGHT;
|
||||||
else if (aFeature.EqualsLiteral("WEBRTC_HW_ACCELERATION"))
|
else if (aFeature.EqualsLiteral("WEBRTC_HW_ACCELERATION"))
|
||||||
return nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION;
|
return nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION;
|
||||||
return 0;
|
|
||||||
|
// If we don't recognize the feature, it may be new, and something
|
||||||
|
// this version doesn't understand. So, nothing to do. This is
|
||||||
|
// different from feature not being specified at all, in which case
|
||||||
|
// this method should not get called and we should continue with the
|
||||||
|
// "all features" blocklisting.
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t
|
static int32_t
|
||||||
|
@ -525,6 +532,11 @@ BlacklistEntryToDriverInfo(nsIDOMNode* aBlacklistEntry,
|
||||||
getter_AddRefs(dataNode))) {
|
getter_AddRefs(dataNode))) {
|
||||||
BlacklistNodeToTextValue(dataNode, dataValue);
|
BlacklistNodeToTextValue(dataNode, dataValue);
|
||||||
aDriverInfo.mFeature = BlacklistFeatureToGfxFeature(dataValue);
|
aDriverInfo.mFeature = BlacklistFeatureToGfxFeature(dataValue);
|
||||||
|
if (aDriverInfo.mFeature < 0) {
|
||||||
|
// If we don't recognize the feature, we do not want to proceed.
|
||||||
|
gfxWarning() << "Unrecognized feature " << NS_ConvertUTF16toUTF8(dataValue).get();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// <featureStatus> BLOCKED_DRIVER_VERSION </featureStatus>
|
// <featureStatus> BLOCKED_DRIVER_VERSION </featureStatus>
|
||||||
|
|
|
@ -64,7 +64,7 @@ interface nsIGfxInfo : nsISupports
|
||||||
* A set of constants for features that we can ask this GfxInfo object
|
* A set of constants for features that we can ask this GfxInfo object
|
||||||
* about via GetFeatureStatus
|
* about via GetFeatureStatus
|
||||||
*/
|
*/
|
||||||
/* Don't assign 0 or -1 */
|
/* Don't assign any value <= 0 */
|
||||||
/* Whether Direct2D is supported for content rendering. */
|
/* Whether Direct2D is supported for content rendering. */
|
||||||
const long FEATURE_DIRECT2D = 1;
|
const long FEATURE_DIRECT2D = 1;
|
||||||
/* Whether Direct3D 9 is supported for layers. */
|
/* Whether Direct3D 9 is supported for layers. */
|
||||||
|
@ -81,15 +81,15 @@ interface nsIGfxInfo : nsISupports
|
||||||
const long FEATURE_WEBGL_ANGLE = 7;
|
const long FEATURE_WEBGL_ANGLE = 7;
|
||||||
/* Whether WebGL antialiasing is supported. */
|
/* Whether WebGL antialiasing is supported. */
|
||||||
const long FEATURE_WEBGL_MSAA = 8;
|
const long FEATURE_WEBGL_MSAA = 8;
|
||||||
/* Whether Stagefright is supported */
|
/* Whether Stagefright is supported, starting in 17. */
|
||||||
const long FEATURE_STAGEFRIGHT = 9;
|
const long FEATURE_STAGEFRIGHT = 9;
|
||||||
/* Whether Webrtc Hardware acceleration is supported */
|
/* Whether Webrtc Hardware acceleration is supported, starting in 31. */
|
||||||
const long FEATURE_WEBRTC_HW_ACCELERATION = 10;
|
const long FEATURE_WEBRTC_HW_ACCELERATION = 10;
|
||||||
/* Whether Direct3D 11 is supported for layers. */
|
/* Whether Direct3D 11 is supported for layers, starting in 32. */
|
||||||
const long FEATURE_DIRECT3D_11_LAYERS = 11;
|
const long FEATURE_DIRECT3D_11_LAYERS = 11;
|
||||||
/* Whether hardware accelerated video decoding is supported. */
|
/* Whether hardware accelerated video decoding is supported, starting in 36. */
|
||||||
const long FEATURE_HARDWARE_VIDEO_DECODING = 12;
|
const long FEATURE_HARDWARE_VIDEO_DECODING = 12;
|
||||||
/* Whether Direct3D 11 is supported for ANGLE. */
|
/* Whether Direct3D 11 is supported for ANGLE, starting in 38. */
|
||||||
const long FEATURE_DIRECT3D_11_ANGLE = 13;
|
const long FEATURE_DIRECT3D_11_ANGLE = 13;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче