Backed out changeset c633db465597 (bug 1245959) for frequent timeout in mda test test_video_dimensions.html. r=backout

This commit is contained in:
Sebastian Hengst 2016-09-25 19:29:13 +02:00
parent 6c06a32cb9
commit 18fb75d3b3

View File

@ -222,14 +222,12 @@ nsPluginInstanceOwner::GetImageContainer()
container = LayerManager::CreateImageContainer();
if (r.width && r.height) {
// Try to get it as an EGLImage first.
RefPtr<Image> img;
AttachToContainerAsSurfaceTexture(container, mInstance, r, &img);
// Try to get it as an EGLImage first.
RefPtr<Image> img;
AttachToContainerAsSurfaceTexture(container, mInstance, r, &img);
if (img) {
container->SetCurrentImageInTransaction(img);
}
if (img) {
container->SetCurrentImageInTransaction(img);
}
#else
if (NeedsScrollImageLayer()) {
@ -1580,13 +1578,11 @@ nsPluginInstanceOwner::GetImageContainerForVideo(nsNPAPIPluginInstance::VideoInf
{
RefPtr<ImageContainer> container = LayerManager::CreateImageContainer();
if (aVideoInfo->mDimensions.width && aVideoInfo->mDimensions.height) {
RefPtr<Image> img = new SurfaceTextureImage(
aVideoInfo->mSurfaceTexture,
gfx::IntSize::Truncate(aVideoInfo->mDimensions.width, aVideoInfo->mDimensions.height),
gl::OriginPos::BottomLeft);
container->SetCurrentImageInTransaction(img);
}
RefPtr<Image> img = new SurfaceTextureImage(
aVideoInfo->mSurfaceTexture,
gfx::IntSize::Truncate(aVideoInfo->mDimensions.width, aVideoInfo->mDimensions.height),
gl::OriginPos::BottomLeft);
container->SetCurrentImageInTransaction(img);
return container.forget();
}