mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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:
parent
b9431febe8
commit
4abd5e4c78
@ -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);
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
|
@ -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(),
|
||||
|
@ -2142,7 +2142,8 @@ public:
|
||||
monitor_("Video PipelineListener")
|
||||
{
|
||||
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
|
||||
image_container_ = LayerManager::CreateImageContainer();
|
||||
image_container_ =
|
||||
LayerManager::CreateImageContainer(ImageContainer::ASYNCHRONOUS);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user