зеркало из https://github.com/mozilla/gecko-dev.git
Bug 764125; sort out preferred and fallback Azure backends for all platforms (gfxInfo). r=Bas
This commit is contained in:
Родитель
9c67b116d5
Коммит
ab776ca738
|
@ -43,12 +43,6 @@ GfxInfo::GetDWriteEnabled(bool *aEnabled)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
GfxInfo::GetAzureEnabled(bool *aEnabled)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString DWriteVersion; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion)
|
||||
|
|
|
@ -25,7 +25,6 @@ public:
|
|||
// rest is brought forward from GfxInfoBase.
|
||||
NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
|
||||
NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
|
||||
NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
|
||||
NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
|
||||
NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
|
||||
NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
|
||||
|
@ -46,6 +45,7 @@ public:
|
|||
using GfxInfoBase::GetFeatureStatus;
|
||||
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
using GfxInfoBase::GetWebGLParameter;
|
||||
using GfxInfoBase::GetAzureEnabled;
|
||||
|
||||
void EnsureInitializedFromGfxInfoData();
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ public:
|
|||
// rest is brought forward from GfxInfoBase.
|
||||
NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
|
||||
NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
|
||||
NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
|
||||
NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
|
||||
NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
|
||||
NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
|
||||
|
@ -46,6 +45,7 @@ public:
|
|||
using GfxInfoBase::GetFeatureStatus;
|
||||
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
using GfxInfoBase::GetWebGLParameter;
|
||||
using GfxInfoBase::GetAzureEnabled;
|
||||
|
||||
virtual nsresult Init();
|
||||
|
||||
|
|
|
@ -154,20 +154,6 @@ GfxInfo::GetD2DEnabled(bool *aEnabled)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAzureEnabled(bool *aEnabled)
|
||||
{
|
||||
bool azure = false;
|
||||
nsresult rv = mozilla::Preferences::GetBool("gfx.canvas.azure.enabled", &azure);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && azure) {
|
||||
*aEnabled = true;
|
||||
} else {
|
||||
*aEnabled = false;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetDWriteEnabled(bool *aEnabled)
|
||||
{
|
||||
|
|
|
@ -59,26 +59,6 @@ GfxInfo::GetDWriteEnabled(bool *aEnabled)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
GfxInfo::GetAzureEnabled(bool *aEnabled)
|
||||
{
|
||||
*aEnabled = false;
|
||||
|
||||
bool d2dEnabled =
|
||||
gfxWindowsPlatform::GetPlatform()->GetRenderMode() == gfxWindowsPlatform::RENDER_DIRECT2D;
|
||||
|
||||
if (d2dEnabled) {
|
||||
bool azure = false;
|
||||
nsresult rv = mozilla::Preferences::GetBool("gfx.canvas.azure.enabled", &azure);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && azure) {
|
||||
*aEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString DWriteVersion; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion)
|
||||
|
|
|
@ -22,7 +22,6 @@ public:
|
|||
// rest is brought forward from GfxInfoBase.
|
||||
NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
|
||||
NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
|
||||
NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
|
||||
NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
|
||||
NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
|
||||
NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
|
||||
|
@ -43,6 +42,7 @@ public:
|
|||
using GfxInfoBase::GetFeatureStatus;
|
||||
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
using GfxInfoBase::GetWebGLParameter;
|
||||
using GfxInfoBase::GetAzureEnabled;
|
||||
|
||||
virtual nsresult Init();
|
||||
|
||||
|
|
|
@ -724,6 +724,22 @@ GfxInfoBase::GetWebGLParameter(const nsAString& aParam,
|
|||
return GfxInfoWebGL::GetWebGLParameter(aParam, aResult);
|
||||
}
|
||||
|
||||
nsresult
|
||||
GfxInfoBase::GetAzureEnabled(bool *aEnabled)
|
||||
{
|
||||
static bool azure = false;
|
||||
static bool azureInited = false;
|
||||
|
||||
if (!azureInited) {
|
||||
azure = mozilla::Preferences::GetBool("gfx.canvas.azure.enabled", false);
|
||||
azureInited = true;
|
||||
}
|
||||
|
||||
*aEnabled = azure;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray<GfxDriverInfo>& aDriverInfo)
|
||||
{
|
||||
|
|
|
@ -41,10 +41,12 @@ public:
|
|||
// using GfxInfoBase::GetFeatureStatus;
|
||||
// using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
// using GfxInfoBase::GetWebGLParameter;
|
||||
// using GfxInfoBase::GetAzureEnabled;
|
||||
// to import the relevant methods into their namespace.
|
||||
NS_IMETHOD GetFeatureStatus(PRInt32 aFeature, PRInt32 *_retval);
|
||||
NS_IMETHOD GetFeatureSuggestedDriverVersion(PRInt32 aFeature, nsAString & _retval);
|
||||
NS_IMETHOD GetWebGLParameter(const nsAString & aParam, nsAString & _retval);
|
||||
NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
|
||||
|
||||
NS_IMETHOD GetFailures(PRUint32 *failureCount, char ***failures);
|
||||
NS_IMETHOD_(void) LogFailure(const nsACString &failure);
|
||||
|
|
|
@ -370,12 +370,6 @@ GfxInfo::GetDWriteEnabled(bool *aEnabled)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAzureEnabled(bool *aEnabled)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString DWriteVersion; */
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion)
|
||||
|
|
|
@ -21,7 +21,6 @@ public:
|
|||
// rest is brought forward from GfxInfoBase.
|
||||
NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
|
||||
NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
|
||||
NS_IMETHOD GetAzureEnabled(bool *aAzureEnabled);
|
||||
NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
|
||||
NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
|
||||
NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
|
||||
|
@ -42,6 +41,7 @@ public:
|
|||
using GfxInfoBase::GetFeatureStatus;
|
||||
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
|
||||
using GfxInfoBase::GetWebGLParameter;
|
||||
using GfxInfoBase::GetAzureEnabled;
|
||||
|
||||
virtual nsresult Init();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче