зеркало из 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)
|
, mBackBuffer(nullptr)
|
||||||
, mFrameCallback(nullptr)
|
, mFrameCallback(nullptr)
|
||||||
, mFrameCallbackSurface(nullptr)
|
, mFrameCallbackSurface(nullptr)
|
||||||
|
, mDisplayThreadMessageLoop(MessageLoop::current())
|
||||||
, mDelayedCommit(false)
|
, mDelayedCommit(false)
|
||||||
, mFullScreenDamage(false)
|
, mFullScreenDamage(false)
|
||||||
, mIsMainThread(NS_IsMainThread())
|
, mIsMainThread(NS_IsMainThread())
|
||||||
|
@ -574,8 +575,8 @@ WindowSurfaceWayland::~WindowSurfaceWayland()
|
||||||
if (!mIsMainThread) {
|
if (!mIsMainThread) {
|
||||||
// We can be destroyed from main thread even though we was created/used
|
// We can be destroyed from main thread even though we was created/used
|
||||||
// in compositor thread. We have to unref/delete WaylandDisplay in compositor
|
// in compositor thread. We have to unref/delete WaylandDisplay in compositor
|
||||||
// thread then.
|
// thread then and we can't use MessageLoop::current() here.
|
||||||
MessageLoop::current()->PostTask(
|
mDisplayThreadMessageLoop->PostTask(
|
||||||
NewRunnableFunction(&WaylandDisplayRelease, mWaylandDisplay->GetDisplay()));
|
NewRunnableFunction(&WaylandDisplayRelease, mWaylandDisplay->GetDisplay()));
|
||||||
} else {
|
} else {
|
||||||
WaylandDisplayRelease(mWaylandDisplay->GetDisplay());
|
WaylandDisplayRelease(mWaylandDisplay->GetDisplay());
|
||||||
|
|
|
@ -121,6 +121,7 @@ private:
|
||||||
WindowBackBuffer* mBackBuffer;
|
WindowBackBuffer* mBackBuffer;
|
||||||
wl_callback* mFrameCallback;
|
wl_callback* mFrameCallback;
|
||||||
wl_surface* mFrameCallbackSurface;
|
wl_surface* mFrameCallbackSurface;
|
||||||
|
MessageLoop* mDisplayThreadMessageLoop;
|
||||||
bool mDelayedCommit;
|
bool mDelayedCommit;
|
||||||
bool mFullScreenDamage;
|
bool mFullScreenDamage;
|
||||||
bool mIsMainThread;
|
bool mIsMainThread;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче