Backed out changeset 112d854f652d (bug 1365772) for Windows bustage: 'gfxConfig': is not a class or namespace name at DeviceAttachmentsD3D11.cpp(179). r=backout on a CLOSED TREE

Valgrind also complains: Conditional jump or move depends on uninitialised value(s) at __get_cpuid / cpuid / read_cpu_features / operator
This commit is contained in:
Sebastian Hengst 2017-06-19 18:23:50 +02:00
Родитель fe6ad243cb
Коммит 905913ead5
13 изменённых файлов: 15 добавлений и 67 удалений

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

@ -26,7 +26,6 @@ namespace gfx {
_(GPU_PROCESS, Feature, "GPU Process") \
_(WEBRENDER, Feature, "WebRender") \
_(OMTP, Feature, "Off Main Thread Painting") \
_(COMPONENT_ALPHA, Feature, "Component Alpha") \
/* Add new entries above this comment */
enum class Feature : uint32_t {

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

@ -19,7 +19,6 @@
#include "gfxEnv.h"
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxPrefs.h"
#include "gfxConfig.h"
#include "gfxUtils.h" // for gfxUtils, etc
#include "gfx2DGlue.h"
#include "mozilla/DebugOnly.h" // for DebugOnly
@ -168,7 +167,7 @@ LayerManager::CreateImageContainer(ImageContainer::Mode flag)
bool
LayerManager::AreComponentAlphaLayersEnabled()
{
return gfxConfig::IsEnabled(Feature::COMPONENT_ALPHA);
return gfxPrefs::ComponentAlphaEnabled();
}
/*static*/ void

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

@ -917,7 +917,7 @@ CompositorD3D11::DrawGeometry(const Geometry& aGeometry,
break;
case EffectTypes::COMPONENT_ALPHA:
{
MOZ_ASSERT(gfxConfig::IsEnabled(Feature::COMPONENT_ALPHA));
MOZ_ASSERT(gfxPrefs::ComponentAlphaEnabled());
MOZ_ASSERT(mAttachments->mComponentBlendState);
EffectComponentAlpha* effectComponentAlpha =
static_cast<EffectComponentAlpha*>(aEffectChain.mPrimaryEffect.get());

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

@ -176,7 +176,7 @@ DeviceAttachmentsD3D11::Initialize()
return false;
}
if (gfxConfig::IsEnabled(Feature::COMPONENT_ALPHA)) {
if (gfxPrefs::ComponentAlphaEnabled()) {
D3D11_RENDER_TARGET_BLEND_DESC rtBlendComponent = {
TRUE,
D3D11_BLEND_ONE,
@ -294,7 +294,7 @@ DeviceAttachmentsD3D11::CreateShaders()
InitPixelShader(sYCbCrShaderMask, mYCbCrShader, MaskType::Mask);
InitPixelShader(sNV12Shader, mNV12Shader, MaskType::MaskNone);
InitPixelShader(sNV12ShaderMask, mNV12Shader, MaskType::Mask);
if (gfxConfig::IsEnabled(Feature::COMPONENT_ALPHA)) {
if (gfxPrefs::ComponentAlphaEnabled()) {
InitPixelShader(sComponentAlphaShader, mComponentAlphaShader, MaskType::MaskNone);
InitPixelShader(sComponentAlphaShaderMask, mComponentAlphaShader, MaskType::Mask);
}

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

@ -16,7 +16,6 @@
#include "gfxEnv.h" // for gfxEnv
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxPrefs.h" // for gfxPrefs
#include "gfxConfig.h"
#include "gfxRect.h" // for gfxRect
#include "gfxUtils.h" // for gfxUtils, etc
#include "mozilla/ArrayUtils.h" // for ArrayLength
@ -1415,7 +1414,7 @@ CompositorOGL::DrawGeometry(const Geometry& aGeometry,
}
break;
case EffectTypes::COMPONENT_ALPHA: {
MOZ_ASSERT(gfxConfig::IsEnabled(Feature::COMPONENT_ALPHA));
MOZ_ASSERT(gfxPrefs::ComponentAlphaEnabled());
MOZ_ASSERT(blendMode == gfx::CompositionOp::OP_OVER, "Can't support blend modes with component alpha!");
EffectComponentAlpha* effectComponentAlpha =
static_cast<EffectComponentAlpha*>(aEffectChain.mPrimaryEffect.get());

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

@ -696,7 +696,6 @@ gfxPlatform::Init()
gPlatform->InitAcceleration();
gPlatform->InitWebRenderConfig();
gPlatform->InitOMTPConfig();
gPlatform->InitComponentAlphaPrefs();
if (gfxConfig::IsEnabled(Feature::GPU_PROCESS)) {
GPUProcessManager* gpu = GPUProcessManager::Get();
@ -2451,34 +2450,6 @@ gfxPlatform::InitOMTPConfig()
}
}
void
gfxPlatform::InitComponentAlphaPrefs()
{
FeatureState& componentAlpha = gfxConfig::GetFeature(Feature::COMPONENT_ALPHA);
// First check the about:config value
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
// If MOZ_GFX_OPTIMIZE_MOBILE is defined, we force component alpha off
// and ignore the preference.
componentAlpha.DisableByDefault(
FeatureStatus::Unavailable,
"Component alpha not available on mobile",
NS_LITERAL_CSTRING("FEATURE_FAILURE_MOBILE"));
#else
componentAlpha.SetDefaultFromPref(
gfxPrefs::GetComponentAlphaEnabledDoNotUseDirectlyPrefName(),
true,
gfxPrefs::GetComponentAlphaEnabledDoNotUseDirectlyPrefDefault());
#endif
// Then check the blocklist value
nsCString message;
nsCString failureId;
if (!IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_COMPONENT_ALPHA, &message, failureId)) {
componentAlpha.Disable(FeatureStatus::Blacklisted, message.get(), failureId);
}
}
bool
gfxPlatform::CanUseHardwareVideoDecoding()
{

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

@ -828,7 +828,6 @@ private:
void InitGPUProcessPrefs();
void InitWebRenderConfig();
void InitOMTPConfig();
void InitComponentAlphaPrefs();
static bool IsDXInterop2Blocked();

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

@ -517,7 +517,15 @@ private:
DECL_GFX_PREF(Live, "layers.bench.enabled", LayersBenchEnabled, bool, false);
DECL_GFX_PREF(Once, "layers.bufferrotation.enabled", BufferRotationEnabled, bool, true);
DECL_GFX_PREF(Live, "layers.child-process-shutdown", ChildProcessShutdown, bool, true);
DECL_GFX_PREF(Once, "layers.componentalpha.enabled", ComponentAlphaEnabledDoNotUseDirectly, bool, true);
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
// If MOZ_GFX_OPTIMIZE_MOBILE is defined, we force component alpha off
// and ignore the preference.
DECL_GFX_PREF(Skip, "layers.componentalpha.enabled", ComponentAlphaEnabled, bool, false);
#else
// If MOZ_GFX_OPTIMIZE_MOBILE is not defined, we actually take the
// preference value, defaulting to true.
DECL_GFX_PREF(Once, "layers.componentalpha.enabled", ComponentAlphaEnabled, bool, true);
#endif
DECL_GFX_PREF(Live, "layers.composer2d.enabled", Composer2DCompositionEnabled, bool, false);
DECL_GFX_PREF(Once, "layers.d3d11.force-warp", LayersD3D11ForceWARP, bool, false);
DECL_GFX_PREF(Live, "layers.deaa.enabled", LayersDEAAEnabled, bool, false);

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

@ -28,18 +28,5 @@
<driverVersion> 8.52.322.2202 </driverVersion>
<driverVersionComparator> LESS_THAN </driverVersionComparator>
</gfxBlacklistEntry>
<gfxBlacklistEntry>
<os>Darwin 13</os>
<vendor>0xabcd</vendor>
<devices>
<device>0x2783</device>
<device>0x1234</device>
<device>0x2782</device>
</devices>
<feature> COMPONENT_ALPHA </feature>
<featureStatus> BLOCKED_DRIVER_VERSION </featureStatus>
<driverVersion> 8.52.322.2202 </driverVersion>
<driverVersionComparator> LESS_THAN </driverVersionComparator>
</gfxBlacklistEntry>
</gfxItems>
</blocklist>

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

@ -79,9 +79,6 @@ function run_test() {
} else if (get_platform() == "Darwin") {
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_OPENGL_LAYERS);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_COMPONENT_ALPHA);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
}
gTestserver.stop(do_test_finished);

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

@ -135,9 +135,6 @@ function run_test() {
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DX_INTEROP2, failureId);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_COMPONENT_ALPHA, failureId);
do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
gTestserver.stop(do_test_finished);
}

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

@ -170,9 +170,6 @@ GetPrefNameForFeature(int32_t aFeature)
case nsIGfxInfo::FEATURE_WEBGL2:
name = BLACKLIST_PREF_BRANCH "webgl2";
break;
case nsIGfxInfo::FEATURE_COMPONENT_ALPHA:
name = BLACKLIST_PREF_BRANCH "layers.componentalpha";
break;
case nsIGfxInfo::FEATURE_VP8_HW_DECODE:
case nsIGfxInfo::FEATURE_VP9_HW_DECODE:
case nsIGfxInfo::FEATURE_DX_INTEROP2:
@ -353,8 +350,6 @@ BlacklistFeatureToGfxFeature(const nsAString& aFeature)
return nsIGfxInfo::FEATURE_CANVAS2D_ACCELERATION;
else if (aFeature.EqualsLiteral("WEBGL2"))
return nsIGfxInfo::FEATURE_WEBGL2;
else if (aFeature.EqualsLiteral("COMPONENT_ALPHA"))
return nsIGfxInfo::FEATURE_COMPONENT_ALPHA;
// If we don't recognize the feature, it may be new, and something
// this version doesn't understand. So, nothing to do. This is
@ -985,7 +980,6 @@ GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray<GfxDriverInfo>& aDriverInfo)
nsIGfxInfo::FEATURE_WEBRTC_HW_ACCELERATION,
nsIGfxInfo::FEATURE_CANVAS2D_ACCELERATION,
nsIGfxInfo::FEATURE_WEBGL2,
nsIGfxInfo::FEATURE_COMPONENT_ALPHA,
0
};

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

@ -124,10 +124,8 @@ interface nsIGfxInfo : nsISupports
const long FEATURE_GPU_PROCESS = 20;
/* Whether the WebGL2 is supported, starting in 54 */
const long FEATURE_WEBGL2 = 21;
/* Whether per-color-component alpha (for sub-pixel-AA) is supported, starting in 56. */
const long FEATURE_COMPONENT_ALPHA = 22;
/* the maximum feature value. */
const long FEATURE_MAX_VALUE = FEATURE_COMPONENT_ALPHA;
const long FEATURE_MAX_VALUE = FEATURE_WEBGL2;
/*
* A set of return values from GetFeatureStatus