Bug 1250710 - Save and restore state, since this is used by WebGL. - r=ethlin

MozReview-Commit-ID: 3KZdIMpcRch
This commit is contained in:
Jeff Gilbert 2016-06-20 14:09:31 -07:00
Родитель 2029fa20f2
Коммит c62e7f4e72
1 изменённых файлов: 7 добавлений и 3 удалений

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

@ -903,9 +903,13 @@ GLBlitHelper::BlitImageToFramebuffer(layers::Image* srcImage,
return BlitGrallocImage(static_cast<layers::GrallocImage*>(srcImage));
#endif
case ConvertPlanarYCbCr:
mGL->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 1);
return BlitPlanarYCbCrImage(static_cast<PlanarYCbCrImage*>(srcImage));
case ConvertPlanarYCbCr: {
const auto saved = mGL->GetIntAs<GLint>(LOCAL_GL_UNPACK_ALIGNMENT);
mGL->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 1);
const auto ret = BlitPlanarYCbCrImage(static_cast<PlanarYCbCrImage*>(srcImage));
mGL->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, saved);
return ret;
}
#ifdef MOZ_WIDGET_ANDROID
case ConvertSurfaceTexture: