зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1299415 - Clear ImageContainer cached resources When VideoSink pause playing r=jwwang
This commit is contained in:
Родитель
19ec5f9a2a
Коммит
758fb640f4
|
@ -294,6 +294,12 @@ void VideoFrameContainer::ClearFutureFrames()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
VideoFrameContainer::ClearCachedResources()
|
||||
{
|
||||
mImageContainer->ClearCachedResources();
|
||||
}
|
||||
|
||||
ImageContainer* VideoFrameContainer::GetImageContainer() {
|
||||
return mImageContainer;
|
||||
}
|
||||
|
|
|
@ -73,6 +73,9 @@ public:
|
|||
// but was actually painted at t+n, this returns n in seconds. Threadsafe.
|
||||
double GetFrameDelay();
|
||||
|
||||
// Clear any resources that are not immediately necessary.
|
||||
void ClearCachedResources();
|
||||
|
||||
// Returns a new frame ID for SetCurrentFrames(). The client must either
|
||||
// call this on only one thread or provide barriers. Do not use together
|
||||
// with SetCurrentFrame().
|
||||
|
|
|
@ -145,6 +145,9 @@ VideoSink::SetPlaying(bool aPlaying)
|
|||
mUpdateScheduler.Reset();
|
||||
// Since playback is paused, tell compositor to render only current frame.
|
||||
RenderVideoFrames(1);
|
||||
if (mContainer) {
|
||||
mContainer->ClearCachedResources();
|
||||
}
|
||||
}
|
||||
|
||||
mAudioSink->SetPlaying(aPlaying);
|
||||
|
|
Загрузка…
Ссылка в новой задаче