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"
14 class CompositorVsyncDispatcher
;
18 namespace remote_backbuffer
{
22 class CompositorWidgetChild final
: public PCompositorWidgetChild
,
23 public PlatformCompositorWidgetDelegate
{
25 CompositorWidgetChild(RefPtr
<CompositorVsyncDispatcher
> aVsyncDispatcher
,
26 RefPtr
<CompositorWidgetVsyncObserver
> aVsyncObserver
,
27 const CompositorWidgetInitData
& aInitData
);
28 ~CompositorWidgetChild() override
;
32 void EnterPresentLock() override
;
33 void LeavePresentLock() override
;
34 void OnDestroyWindow() override
;
35 bool OnWindowResize(const LayoutDeviceIntSize
& aSize
) override
;
36 void NotifyVisibilityUpdated(bool aIsFullyOccluded
) override
;
38 void UpdateTransparency(TransparencyMode
) override
;
39 void ClearTransparentWindow() override
;
41 mozilla::ipc::IPCResult
RecvObserveVsync() override
;
42 mozilla::ipc::IPCResult
RecvUnobserveVsync() override
;
43 mozilla::ipc::IPCResult
RecvUpdateCompositorWnd(
44 const WindowsHandle
& aCompositorWnd
, const WindowsHandle
& aParentWnd
,
45 UpdateCompositorWndResolver
&& aResolve
) override
;
48 RefPtr
<CompositorVsyncDispatcher
> mVsyncDispatcher
;
49 RefPtr
<CompositorWidgetVsyncObserver
> mVsyncObserver
;
54 std::unique_ptr
<remote_backbuffer::Provider
> mRemoteBackbufferProvider
;
58 } // namespace mozilla
60 #endif // widget_windows_CompositorWidgetChild_h