зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1292288 - Don't hold both the effects lock and the GL lock at the same time in PrepareWindowEffects to avoid deadlock. r=mstange
--HG-- extra : rebase_source : f80ae0cfca630b7a414eea8921047996a9122104
This commit is contained in:
Родитель
bf8a0ba830
Коммит
af772b40e6
|
@ -1994,23 +1994,27 @@ nsChildView::PrepareWindowEffects()
|
|||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
MutexAutoLock lock(mEffectsLock);
|
||||
mShowsResizeIndicator = ShowsResizeIndicator(&mResizeIndicatorRect);
|
||||
mHasRoundedBottomCorners = [(ChildView*)mView hasRoundedBottomCorners];
|
||||
CGFloat cornerRadius = [(ChildView*)mView cornerRadius];
|
||||
mDevPixelCornerRadius = cornerRadius * BackingScaleFactor();
|
||||
mIsCoveringTitlebar = [(ChildView*)mView isCoveringTitlebar];
|
||||
NSInteger styleMask = [[mView window] styleMask];
|
||||
bool isFullscreen = (styleMask & NSFullScreenWindowMask) || !(styleMask & NSTitledWindowMask);
|
||||
bool isFullscreen;
|
||||
{
|
||||
MutexAutoLock lock(mEffectsLock);
|
||||
mShowsResizeIndicator = ShowsResizeIndicator(&mResizeIndicatorRect);
|
||||
mHasRoundedBottomCorners = [(ChildView*)mView hasRoundedBottomCorners];
|
||||
CGFloat cornerRadius = [(ChildView*)mView cornerRadius];
|
||||
mDevPixelCornerRadius = cornerRadius * BackingScaleFactor();
|
||||
mIsCoveringTitlebar = [(ChildView*)mView isCoveringTitlebar];
|
||||
NSInteger styleMask = [[mView window] styleMask];
|
||||
isFullscreen = (styleMask & NSFullScreenWindowMask) || !(styleMask & NSTitledWindowMask);
|
||||
if (mIsCoveringTitlebar) {
|
||||
mTitlebarRect = RectContainingTitlebarControls();
|
||||
UpdateTitlebarCGContext();
|
||||
}
|
||||
}
|
||||
|
||||
// If we've just transitioned into or out of full screen then update the opacity on our GLContext.
|
||||
if (isFullscreen != mIsFullscreen) {
|
||||
mIsFullscreen = isFullscreen;
|
||||
[(ChildView*)mView setFullscreen:isFullscreen];
|
||||
}
|
||||
if (mIsCoveringTitlebar) {
|
||||
mTitlebarRect = RectContainingTitlebarControls();
|
||||
UpdateTitlebarCGContext();
|
||||
}
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче