Bug 1377827 - Don't try to initialize texture data unless the texture is otherwise complete. - r=daoshengmu

MozReview-Commit-ID: 4alHrHS2vMJ
This commit is contained in:
Jeff Gilbert 2017-07-02 22:28:25 -07:00
Родитель 51f7ac9c81
Коммит 0b1caa2664
1 изменённых файлов: 5 добавлений и 5 удалений

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

@ -320,11 +320,6 @@ WebGLTexture::IsComplete(const char* funcName, uint32_t texUnit,
return false;
}
if (!EnsureLevelInitialized(funcName, mBaseMipmapLevel)) {
*out_initFailed = true;
return false;
}
// Texture completeness is established at GLES 3.0.4, p160-161.
// "[A] texture is complete unless any of the following conditions hold true:"
@ -452,6 +447,11 @@ WebGLTexture::IsComplete(const char* funcName, uint32_t texUnit,
// (already covered)
}
if (!EnsureLevelInitialized(funcName, mBaseMipmapLevel)) {
*out_initFailed = true;
return false;
}
return true;
}