Backed out changeset c633db465597 (bug 1245959) for frequent timeout in mda test test_video_dimensions.html. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 25 Sep 2016 19:29:13 +0200
changeset 315244 17247ecdaf69a1412ffb327b165d190b1447d2e6
parent 315243 2cb11a4e6f61536a8d4800da0562ec7f193200e6
child 315245 05a02a824ae21a7496903b719be11a90e6082f2b
push id32563
push userihsiao@mozilla.com
push dateMon, 26 Sep 2016 11:18:33 +0000
treeherderautoland@eb840c87b5fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1245959
milestone52.0a1
backs outc633db4655979cde4c7b1723a3897e48781a39ef
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset c633db465597 (bug 1245959) for frequent timeout in mda test test_video_dimensions.html. r=backout
dom/plugins/base/nsPluginInstanceOwner.cpp
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -217,24 +217,22 @@ nsPluginInstanceOwner::GetImageContainer
   // NotifySize() causes Flash to do a bunch of stuff like ask for surfaces to render
   // into, set y-flip flags, etc, so we do this at the beginning.
   float resolution = mPluginFrame->PresContext()->PresShell()->GetCumulativeResolution();
   ScreenSize screenSize = (r * LayoutDeviceToScreenScale(resolution)).Size();
   mInstance->NotifySize(nsIntSize::Truncate(screenSize.width, screenSize.height));
 
   container = LayerManager::CreateImageContainer();
 
-  if (r.width && r.height) {
-    // Try to get it as an EGLImage first.
-    RefPtr<Image> img;
-    AttachToContainerAsSurfaceTexture(container, mInstance, r, &img);
-
-    if (img) {
-      container->SetCurrentImageInTransaction(img);
-    }
+  // Try to get it as an EGLImage first.
+  RefPtr<Image> img;
+  AttachToContainerAsSurfaceTexture(container, mInstance, r, &img);
+
+  if (img) {
+    container->SetCurrentImageInTransaction(img);
   }
 #else
   if (NeedsScrollImageLayer()) {
     // windowed plugin under e10s
 #if defined(XP_WIN)
     mInstance->GetScrollCaptureContainer(getter_AddRefs(container));
 #endif
   } else {
@@ -1575,23 +1573,21 @@ nsPluginInstanceOwner::GetVideos(nsTArra
   mInstance->GetVideos(aVideos);
 }
 
 already_AddRefed<ImageContainer>
 nsPluginInstanceOwner::GetImageContainerForVideo(nsNPAPIPluginInstance::VideoInfo* aVideoInfo)
 {
   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();
 }
 
 void nsPluginInstanceOwner::Invalidate() {
   NPRect rect;
   rect.left = rect.top = 0;
   rect.right = mPluginWindow->width;