зеркало из https://github.com/mozilla/gecko-dev.git
b=797568 call Finish() on old surfaces before passing them back to child r=roc
--HG-- extra : transplant_source : %9A%EF%B0%AF.%F4c%A5%3A%9C%D2aV%84%CE%B3FfeJ
This commit is contained in:
Родитель
7edd55a95b
Коммит
c863929edb
|
@ -599,16 +599,21 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_X11
|
||||
if (mFrontSurface &&
|
||||
mFrontSurface->GetType() == gfxASurface::SurfaceTypeXlib)
|
||||
if (mFrontSurface) {
|
||||
// This is the "old front buffer" we're about to hand back to
|
||||
// the plugin. We might still have drawing operations
|
||||
// referencing it, so we XSync here to let them finish before
|
||||
// the plugin starts scribbling on it again, or worse,
|
||||
// destroys it.
|
||||
FinishX(DefaultXDisplay());
|
||||
// referencing it.
|
||||
mFrontSurface->Finish();
|
||||
|
||||
#ifdef MOZ_X11
|
||||
if (mFrontSurface->GetType() == gfxASurface::SurfaceTypeXlib) {
|
||||
// XSync here to ensure the server has finished operations on the
|
||||
// surface before the plugin starts scribbling on it again, or
|
||||
// worse, destroys it.
|
||||
FinishX(DefaultXDisplay());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (mFrontSurface && gfxSharedImageSurface::IsSharedImage(mFrontSurface))
|
||||
*prevSurface = static_cast<gfxSharedImageSurface*>(mFrontSurface.get())->GetShmem();
|
||||
|
|
Загрузка…
Ссылка в новой задаче