Bug 1206708 - Make all WebRTC ImageContainers async. r=jesup,nical

This avoids expensive copying when compositing these frames on e10s.

MozReview-Commit-ID: LIeUhh6rjCf

--HG--
extra : rebase_source : 1919596f2cb61d25474993f209a632531d3797fa
This commit is contained in:
Andreas Pehrson 2016-04-11 16:13:26 +02:00
parent b9431febe8
commit 4abd5e4c78
5 changed files with 10 additions and 5 deletions

View File

@ -46,7 +46,8 @@ VideoFrame::TakeFrom(VideoFrame* aFrame)
/* static */ already_AddRefed<Image>
VideoFrame::CreateBlackImage(const gfx::IntSize& aSize)
{
RefPtr<ImageContainer> container = LayerManager::CreateImageContainer();
RefPtr<ImageContainer> container =
LayerManager::CreateImageContainer(ImageContainer::ASYNCHRONOUS);
RefPtr<PlanarYCbCrImage> image = container->CreatePlanarYCbCrImage();
if (!image) {
MOZ_ASSERT(false);

View File

@ -49,7 +49,8 @@ MediaEngineDefaultVideoSource::MediaEngineDefaultVideoSource()
, mMonitor("Fake video")
, mCb(16), mCr(16)
{
mImageContainer = layers::LayerManager::CreateImageContainer();
mImageContainer =
layers::LayerManager::CreateImageContainer(layers::ImageContainer::ASYNCHRONOUS);
}
MediaEngineDefaultVideoSource::~MediaEngineDefaultVideoSource()

View File

@ -190,7 +190,8 @@ MediaEngineRemoteVideoSource::Start(SourceMediaStream* aStream, TrackID aID,
if (mState == kStarted) {
return NS_OK;
}
mImageContainer = layers::LayerManager::CreateImageContainer();
mImageContainer =
layers::LayerManager::CreateImageContainer(layers::ImageContainer::ASYNCHRONOUS);
mState = kStarted;
mTrackID = aID;

View File

@ -288,7 +288,8 @@ MediaEngineTabVideoSource::Draw() {
presShell = presContext->PresShell();
}
RefPtr<layers::ImageContainer> container = layers::LayerManager::CreateImageContainer();
RefPtr<layers::ImageContainer> container =
layers::LayerManager::CreateImageContainer(layers::ImageContainer::ASYNCHRONOUS);
RefPtr<DrawTarget> dt =
Factory::CreateDrawTargetForData(BackendType::CAIRO,
mData.get(),

View File

@ -2142,7 +2142,8 @@ public:
monitor_("Video PipelineListener")
{
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
image_container_ = LayerManager::CreateImageContainer();
image_container_ =
LayerManager::CreateImageContainer(ImageContainer::ASYNCHRONOUS);
#endif
}