зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1426351 - WindowSurfaceWayland - delete WaylandDisplay owned by compositor thread at compositor thread, r=jhorak
MozReview-Commit-ID: 6jtdXuiTj1F --HG-- extra : rebase_source : cc072ac276956e2f8299dcfef3934dc16dbfbeda
This commit is contained in:
Родитель
25684dd699
Коммит
72aad592e6
|
@ -556,6 +556,7 @@ WindowSurfaceWayland::WindowSurfaceWayland(nsWindow *aWindow)
|
|||
, mBackBuffer(nullptr)
|
||||
, mFrameCallback(nullptr)
|
||||
, mFrameCallbackSurface(nullptr)
|
||||
, mDisplayThreadMessageLoop(MessageLoop::current())
|
||||
, mDelayedCommit(false)
|
||||
, mFullScreenDamage(false)
|
||||
, mIsMainThread(NS_IsMainThread())
|
||||
|
@ -574,8 +575,8 @@ WindowSurfaceWayland::~WindowSurfaceWayland()
|
|||
if (!mIsMainThread) {
|
||||
// We can be destroyed from main thread even though we was created/used
|
||||
// in compositor thread. We have to unref/delete WaylandDisplay in compositor
|
||||
// thread then.
|
||||
MessageLoop::current()->PostTask(
|
||||
// thread then and we can't use MessageLoop::current() here.
|
||||
mDisplayThreadMessageLoop->PostTask(
|
||||
NewRunnableFunction(&WaylandDisplayRelease, mWaylandDisplay->GetDisplay()));
|
||||
} else {
|
||||
WaylandDisplayRelease(mWaylandDisplay->GetDisplay());
|
||||
|
|
|
@ -121,6 +121,7 @@ private:
|
|||
WindowBackBuffer* mBackBuffer;
|
||||
wl_callback* mFrameCallback;
|
||||
wl_surface* mFrameCallbackSurface;
|
||||
MessageLoop* mDisplayThreadMessageLoop;
|
||||
bool mDelayedCommit;
|
||||
bool mFullScreenDamage;
|
||||
bool mIsMainThread;
|
||||
|
|
Загрузка…
Ссылка в новой задаче