зеркало из https://github.com/mozilla/gecko-dev.git
Bug 791711 - Invalidate again if the SharedImageID was removed. r=nical, a=blocking-basecamp
This commit is contained in:
Родитель
546996ad91
Коммит
b0e66f0e5c
|
@ -2792,7 +2792,7 @@ void nsHTMLMediaElement::EndSrcMediaStreamPlayback()
|
|||
VideoFrameContainer* container = GetVideoFrameContainer();
|
||||
if (container) {
|
||||
GetSrcMediaStream()->RemoveVideoOutput(container);
|
||||
container->GetImageContainer()->SetCurrentImage(nullptr);
|
||||
container->ClearCurrentFrame();
|
||||
}
|
||||
if (mPaused) {
|
||||
GetSrcMediaStream()->ChangeExplicitBlockerCount(-1);
|
||||
|
|
|
@ -77,6 +77,10 @@ void VideoFrameContainer::ClearCurrentFrame()
|
|||
mImageContainer->UnlockCurrentImage();
|
||||
|
||||
mImageContainer->SetCurrentImage(nullptr);
|
||||
|
||||
// We removed the current image so we will have to invalidate once
|
||||
// again to setup the ImageContainer <-> Compositor pair.
|
||||
mNeedInvalidation = true;
|
||||
}
|
||||
|
||||
ImageContainer* VideoFrameContainer::GetImageContainer() {
|
||||
|
@ -97,7 +101,10 @@ void VideoFrameContainer::Invalidate()
|
|||
if (!mNeedInvalidation) {
|
||||
return;
|
||||
}
|
||||
if (mImageContainer && mImageContainer->IsAsync()) {
|
||||
|
||||
if (mImageContainer &&
|
||||
mImageContainer->IsAsync() &&
|
||||
mImageContainer->HasCurrentImage()) {
|
||||
mNeedInvalidation = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ SharedImage* ImageContainerParent::SwapSharedImage(uint64_t aID,
|
|||
int idx = IndexOf(aID);
|
||||
if (idx == SHAREDIMAGEMAP_INVALID_INDEX) {
|
||||
sSharedImageMap->AppendElement(ImageIDPair(aImage,aID));
|
||||
return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
SharedImage *prev = (*sSharedImageMap)[idx].image;
|
||||
(*sSharedImageMap)[idx].image = aImage;
|
||||
|
|
Загрузка…
Ссылка в новой задаче