author | Markus Stange <mstange@themasta.com> |
Fri, 15 Nov 2019 20:35:10 +0000 | |
changeset 502284 | 284910a66370a61a378e10f667256b5c5b59607f |
parent 502283 | bd42216f7b6309c683bcc8d9d63c26a834d08d04 |
child 502285 | 2cadb540632e5ff822f31b444a3870869676d772 |
push id | 36808 |
push user | shindli@mozilla.com |
push date | Sat, 16 Nov 2019 05:13:16 +0000 |
treeherder | mozilla-central@1d6c106c86d5 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | spohl |
bugs | 1596696, 1576390 |
milestone | 72.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -1709,27 +1709,29 @@ bool nsChildView::PreRender(WidgetRender // compositing. That would make us unable to call postRender on it when the // composition is done, thus keeping the GL context locked forever. mViewTearDownLock.Lock(); return true; } void nsChildView::PostRender(WidgetRenderingContext* aContext) { - auto compositingState = mCompositingState.Lock(); - if (compositingState->mAsyncCATransactionsSuspended) { - // We should not trigger a CATransactions on this thread. Instead, let the - // main thread take care of calling ApplyChanges at an appropriate time. - compositingState->mNativeLayerChangesPending = true; - } else { - // Force a CoreAnimation layer tree update from this thread. - [NSAnimationContext beginGrouping]; - mNativeLayerRoot->ApplyChanges(); - compositingState->mNativeLayerChangesPending = false; - [NSAnimationContext endGrouping]; + { // scope for lock + auto compositingState = mCompositingState.Lock(); + if (compositingState->mAsyncCATransactionsSuspended) { + // We should not trigger a CATransactions on this thread. Instead, let the + // main thread take care of calling ApplyChanges at an appropriate time. + compositingState->mNativeLayerChangesPending = true; + } else { + // Force a CoreAnimation layer tree update from this thread. + [NSAnimationContext beginGrouping]; + mNativeLayerRoot->ApplyChanges(); + compositingState->mNativeLayerChangesPending = false; + [NSAnimationContext endGrouping]; + } } mViewTearDownLock.Unlock(); } RefPtr<layers::NativeLayerRoot> nsChildView::GetNativeLayerRoot() { return mNativeLayerRoot; } static int32_t FindTitlebarBottom(const nsTArray<nsIWidget::ThemeGeometry>& aThemeGeometries, int32_t aWindowWidth) {