Bug 1861709 replace AudioCallbackDriver::ThreadRunning() assertions that mean to...
[gecko.git] / widget / windows / CompositorWidgetChild.h
blobbec8ead98eadfbdded672a9e73075fba579e8e4f
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef widget_windows_CompositorWidgetChild_h
7 #define widget_windows_CompositorWidgetChild_h
9 #include "WinCompositorWidget.h"
10 #include "mozilla/widget/PCompositorWidgetChild.h"
11 #include "mozilla/widget/CompositorWidgetVsyncObserver.h"
13 namespace mozilla {
14 class CompositorVsyncDispatcher;
16 namespace widget {
18 namespace remote_backbuffer {
19 class Provider;
22 class CompositorWidgetChild final : public PCompositorWidgetChild,
23 public PlatformCompositorWidgetDelegate {
24 public:
25 CompositorWidgetChild(RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher,
26 RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver,
27 const CompositorWidgetInitData& aInitData);
28 ~CompositorWidgetChild() override;
30 bool Initialize();
32 void EnterPresentLock() override;
33 void LeavePresentLock() override;
34 void OnDestroyWindow() override;
35 bool OnWindowResize(const LayoutDeviceIntSize& aSize) override;
36 void OnWindowModeChange(nsSizeMode aSizeMode) override;
37 void UpdateTransparency(TransparencyMode aMode) override;
38 void NotifyVisibilityUpdated(nsSizeMode aSizeMode,
39 bool aIsFullyOccluded) override;
40 void ClearTransparentWindow() override;
42 mozilla::ipc::IPCResult RecvObserveVsync() override;
43 mozilla::ipc::IPCResult RecvUnobserveVsync() override;
44 mozilla::ipc::IPCResult RecvUpdateCompositorWnd(
45 const WindowsHandle& aCompositorWnd, const WindowsHandle& aParentWnd,
46 UpdateCompositorWndResolver&& aResolve) override;
48 private:
49 RefPtr<CompositorVsyncDispatcher> mVsyncDispatcher;
50 RefPtr<CompositorWidgetVsyncObserver> mVsyncObserver;
51 HWND mCompositorWnd;
53 HWND mWnd;
54 TransparencyMode mTransparencyMode;
56 std::unique_ptr<remote_backbuffer::Provider> mRemoteBackbufferProvider;
59 } // namespace widget
60 } // namespace mozilla
62 #endif // widget_windows_CompositorWidgetChild_h