зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1680595 - Point users towards "webgl.disable-fail-if-major-performance-caveat" if failIfMajorPerformanceCaveat: true causes failure. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98824
This commit is contained in:
Родитель
01b80dad31
Коммит
77070731a2
|
@ -582,6 +582,11 @@ static bool IsWebglOutOfProcessEnabled() {
|
|||
return useOop;
|
||||
}
|
||||
|
||||
static inline bool StartsWith(const std::string& haystack,
|
||||
const std::string& needle) {
|
||||
return haystack.find(needle) == 0;
|
||||
}
|
||||
|
||||
bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
|
||||
const auto pNotLost = std::make_shared<webgl::NotLostData>(*this);
|
||||
auto& notLost = *pNotLost;
|
||||
|
@ -692,7 +697,13 @@ bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
|
|||
return Ok();
|
||||
}();
|
||||
if (!res.isOk()) {
|
||||
notLost.info.error = res.unwrapErr();
|
||||
auto str = res.unwrapErr();
|
||||
if (StartsWith(str, "failIfMajorPerformanceCaveat")) {
|
||||
str +=
|
||||
" (about:config override available:"
|
||||
" webgl.disable-fail-if-major-performance-caveat)";
|
||||
}
|
||||
notLost.info.error = str;
|
||||
}
|
||||
if (!notLost.info.error.empty()) {
|
||||
ThrowEvent_WebGLContextCreationError(notLost.info.error);
|
||||
|
|
|
@ -552,7 +552,7 @@ RefPtr<WebGLContext> WebGLContext::Create(HostWebGLContext& host,
|
|||
if (webgl->gl->GetContextType() == gl::GLContextType::WGL &&
|
||||
!gl::sWGLLib.HasDXInterop2()) {
|
||||
failureId = "FEATURE_FAILURE_WEBGL_DXGL_INTEROP2"_ns;
|
||||
return Err("Caveat: WGL without DXGLInterop2.");
|
||||
return Err("failIfMajorPerformanceCaveat: WGL without DXGLInterop2.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче