Bug 1382185 - Check the status of GLContext::MakeCurrent in TexUnpackBlob.cpp. r=jgilber

This commit is contained in:
Nicolas Silva 2017-07-24 12:24:25 +02:00
parent 13f0f93675
commit 4c59337e27

View File

@ -887,7 +887,10 @@ TexUnpackSurface::TexOrSubImage(bool isSubImage, bool needsRespec, const char* f
//// ////
const auto& gl = webgl->gl; const auto& gl = webgl->gl;
MOZ_ALWAYS_TRUE( gl->MakeCurrent() ); if (!gl->MakeCurrent()) {
*out_error = LOCAL_GL_CONTEXT_LOST;
return true;
}
gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, dstAlignment); gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, dstAlignment);
if (webgl->IsWebGL2()) { if (webgl->IsWebGL2()) {