Bug 1315582 - Try recreate ImageContainer IPDL object before creating Images. r=dvander
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 08 Nov 2016 15:24:13 +1300
changeset 348298 3677545baae259dfde553b9df19879beaf396901
parent 348297 e38e63ec11cc305aca30c97bba67feb2982c24cf
child 348299 62e8c9846f480b22a4e432bfaabe72fe632d4edb
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1315582
milestone52.0a1
Bug 1315582 - Try recreate ImageContainer IPDL object before creating Images. r=dvander
gfx/layers/ImageContainer.cpp
--- a/gfx/layers/ImageContainer.cpp
+++ b/gfx/layers/ImageContainer.cpp
@@ -155,26 +155,28 @@ ImageContainer::~ImageContainer()
     }
   }
 }
 
 RefPtr<PlanarYCbCrImage>
 ImageContainer::CreatePlanarYCbCrImage()
 {
   ReentrantMonitorAutoEnter mon(mReentrantMonitor);
+  EnsureImageClient(false);
   if (mImageClient && mImageClient->AsImageClientSingle()) {
     return new SharedPlanarYCbCrImage(mImageClient);
   }
   return mImageFactory->CreatePlanarYCbCrImage(mScaleHint, mRecycleBin);
 }
 
 RefPtr<SharedRGBImage>
 ImageContainer::CreateSharedRGBImage()
 {
   ReentrantMonitorAutoEnter mon(mReentrantMonitor);
+  EnsureImageClient(false);
   if (!mImageClient || !mImageClient->AsImageClientSingle()) {
     return nullptr;
   }
   return new SharedRGBImage(mImageClient);
 }
 
 void
 ImageContainer::SetCurrentImageInternal(const nsTArray<NonOwningImage>& aImages)