mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 956b56977688 (bug 1190281) for gfx crashes
This commit is contained in:
parent
22c48f6fe8
commit
44aaa94d4f
@ -5196,9 +5196,6 @@ ContentParent::RecvBeginDriverCrashGuard(const uint32_t& aGuardType, bool* aOutC
|
||||
case gfx::CrashGuardType::D3D9Video:
|
||||
guard = MakeUnique<gfx::D3D9VideoCrashGuard>(this);
|
||||
break;
|
||||
case gfx::CrashGuardType::GLContext:
|
||||
guard = MakeUnique<gfx::GLContextCrashGuard>(this);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("unknown crash guard type");
|
||||
return false;
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "TextureGarbageBin.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "DriverCrashGuard.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
|
||||
#include "OGLShaderProgram.h" // for ShaderProgramType
|
||||
@ -369,11 +368,6 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
|
||||
return true;
|
||||
}
|
||||
|
||||
GLContextCrashGuard crashGuard;
|
||||
if (crashGuard.Crashed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
mWorkAroundDriverBugs = gfxPrefs::WorkAroundDriverBugs();
|
||||
|
||||
SymLoadStruct symbols[] = {
|
||||
|
@ -25,7 +25,6 @@ static const size_t NUM_CRASH_GUARD_TYPES = size_t(CrashGuardType::NUM_TYPES);
|
||||
static const char* sCrashGuardNames[NUM_CRASH_GUARD_TYPES] = {
|
||||
"d3d11layers",
|
||||
"d3d9video",
|
||||
"glcontext",
|
||||
};
|
||||
|
||||
DriverCrashGuard::DriverCrashGuard(CrashGuardType aType, dom::ContentParent* aContentParent)
|
||||
@ -55,14 +54,6 @@ DriverCrashGuard::InitializeIfNeeded()
|
||||
void
|
||||
DriverCrashGuard::Initialize()
|
||||
{
|
||||
// Using DriverCrashGuard off the main thread currently does not work. Under
|
||||
// e10s it could conceivably work by dispatching the IPC calls via the main
|
||||
// thread. In the parent process this would be harder. For now, we simply
|
||||
// exit early instead.
|
||||
if (!NS_IsMainThread()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
// Ask the parent whether or not activating the guard is okay. The parent
|
||||
// won't bother if it detected a crash.
|
||||
@ -462,50 +453,5 @@ D3D9VideoCrashGuard::LogFeatureDisabled()
|
||||
gfxCriticalError(CriticalLog::DefaultOptions(false)) << "DXVA2D3D9 video decoding is disabled due to a previous crash.";
|
||||
}
|
||||
|
||||
GLContextCrashGuard::GLContextCrashGuard(dom::ContentParent* aContentParent)
|
||||
: DriverCrashGuard(CrashGuardType::GLContext, aContentParent)
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
GLContextCrashGuard::UpdateEnvironment()
|
||||
{
|
||||
static bool checked = false;
|
||||
static bool changed = false;
|
||||
|
||||
if (checked) {
|
||||
return changed;
|
||||
}
|
||||
|
||||
checked = true;
|
||||
|
||||
#if defined(XP_WIN)
|
||||
changed |= CheckAndUpdateBoolPref("gfx.driver-init.webgl-angle-force-d3d11",
|
||||
gfxPrefs::WebGLANGLEForceD3D11());
|
||||
changed |= CheckAndUpdateBoolPref("gfx.driver-init.webgl-angle-try-d3d11",
|
||||
gfxPrefs::WebGLANGLETryD3D11());
|
||||
changed |= CheckAndUpdateBoolPref("gfx.driver-init.webgl-angle-force-warp",
|
||||
gfxPrefs::WebGLANGLEForceWARP());
|
||||
changed |= CheckAndUpdateBoolPref("gfx.driver-init.webgl-angle",
|
||||
FeatureEnabled(nsIGfxInfo::FEATURE_WEBGL_ANGLE));
|
||||
changed |= CheckAndUpdateBoolPref("gfx.driver-init.direct3d11-angle",
|
||||
FeatureEnabled(nsIGfxInfo::FEATURE_DIRECT3D_11_ANGLE));
|
||||
#endif
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
void
|
||||
GLContextCrashGuard::LogCrashRecovery()
|
||||
{
|
||||
gfxCriticalError(CriticalLog::DefaultOptions(false)) << "GLContext just crashed and is now disabled.";
|
||||
}
|
||||
|
||||
void
|
||||
GLContextCrashGuard::LogFeatureDisabled()
|
||||
{
|
||||
gfxCriticalError(CriticalLog::DefaultOptions(false)) << "GLContext is disabled due to a previous crash.";
|
||||
}
|
||||
|
||||
} // namespace gfx
|
||||
} // namespace mozilla
|
||||
|
@ -39,7 +39,6 @@ enum class CrashGuardType : uint32_t
|
||||
{
|
||||
D3D11Layers,
|
||||
D3D9Video,
|
||||
GLContext,
|
||||
NUM_TYPES
|
||||
};
|
||||
|
||||
@ -143,17 +142,6 @@ class D3D9VideoCrashGuard final : public DriverCrashGuard
|
||||
void LogFeatureDisabled() override;
|
||||
};
|
||||
|
||||
class GLContextCrashGuard final : public DriverCrashGuard
|
||||
{
|
||||
public:
|
||||
explicit GLContextCrashGuard(dom::ContentParent* aContentParent = nullptr);
|
||||
|
||||
protected:
|
||||
bool UpdateEnvironment() override;
|
||||
void LogCrashRecovery() override;
|
||||
void LogFeatureDisabled() override;
|
||||
};
|
||||
|
||||
} // namespace gfx
|
||||
} // namespace mozilla
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user