mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Protect main thread in-process access to WinCompositorWidget transparent surface.
This commit is contained in:
parent
acb2819baa
commit
416ce4eb69
2 changed files with 29 additions and 0 deletions
|
|
@ -23,6 +23,31 @@ InProcessWinCompositorWidget::InProcessWinCompositorWidget(const CompositorWidge
|
|||
MOZ_ASSERT(mWindow);
|
||||
}
|
||||
|
||||
void
|
||||
InProcessWinCompositorWidget::OnDestroyWindow()
|
||||
{
|
||||
EnterPresentLock();
|
||||
WinCompositorWidget::OnDestroyWindow();
|
||||
LeavePresentLock();
|
||||
}
|
||||
|
||||
void
|
||||
InProcessWinCompositorWidget::UpdateTransparency(nsTransparencyMode aMode)
|
||||
{
|
||||
EnterPresentLock();
|
||||
WinCompositorWidget::UpdateTransparency(aMode);
|
||||
LeavePresentLock();
|
||||
}
|
||||
|
||||
void
|
||||
InProcessWinCompositorWidget::ClearTransparentWindow()
|
||||
{
|
||||
EnterPresentLock();
|
||||
WinCompositorWidget::ClearTransparentWindow();
|
||||
LeavePresentLock();
|
||||
}
|
||||
|
||||
|
||||
nsIWidget*
|
||||
InProcessWinCompositorWidget::RealWidget()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ class InProcessWinCompositorWidget final : public WinCompositorWidget
|
|||
public:
|
||||
InProcessWinCompositorWidget(const CompositorWidgetInitData& aInitData, nsWindow* aWindow);
|
||||
|
||||
void OnDestroyWindow() override;
|
||||
void UpdateTransparency(nsTransparencyMode aMode) override;
|
||||
void ClearTransparentWindow() override;
|
||||
|
||||
void ObserveVsync(VsyncObserver* aObserver) override;
|
||||
nsIWidget* RealWidget() override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue