зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1268638 - Disable native GL for webgl1, but allow in webgl2. - r=jrmuizel
MozReview-Commit-ID: FZJcIGsKb62
This commit is contained in:
Родитель
e7a50dd7a3
Коммит
fbc4cfa85b
|
@ -695,16 +695,15 @@ bool
|
|||
WebGLContext::CreateAndInitGL(bool forceEnabled,
|
||||
std::vector<FailureReason>* const out_failReasons)
|
||||
{
|
||||
bool blacklistOpenGL = false;
|
||||
if (!forceEnabled) {
|
||||
bool disableNativeGL = true;
|
||||
if (forceEnabled) {
|
||||
disableNativeGL = false;
|
||||
} else if (IsWebGL2()) {
|
||||
const nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
|
||||
const auto feature = nsIGfxInfo::FEATURE_WEBGL_OPENGL;
|
||||
|
||||
FailureReason reason;
|
||||
if (IsFeatureInBlacklist(gfxInfo, nsIGfxInfo::FEATURE_WEBGL_OPENGL,
|
||||
&reason.key))
|
||||
{
|
||||
blacklistOpenGL = true;
|
||||
|
||||
if (IsFeatureInBlacklist(gfxInfo, feature, &reason.key)) {
|
||||
reason.info = "Refused to create native OpenGL context because of blacklist"
|
||||
" entry: ";
|
||||
reason.info.Append(reason.key);
|
||||
|
@ -712,6 +711,8 @@ WebGLContext::CreateAndInitGL(bool forceEnabled,
|
|||
out_failReasons->push_back(reason);
|
||||
|
||||
GenerateWarning(reason.info.BeginReading());
|
||||
} else {
|
||||
disableNativeGL = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -727,7 +728,7 @@ WebGLContext::CreateAndInitGL(bool forceEnabled,
|
|||
|
||||
//////
|
||||
|
||||
if (!blacklistOpenGL) {
|
||||
if (!disableNativeGL) {
|
||||
const bool useEGL = PR_GetEnv("MOZ_WEBGL_FORCE_EGL");
|
||||
|
||||
if (useEGL)
|
||||
|
|
Загрузка…
Ссылка в новой задаче