Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / gtk / CompositorWidgetChild.h
blobf46cf63bfbb2f171d5e474282202a3169328d69e
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_gtk_CompositorWidgetChild_h
7 #define widget_gtk_CompositorWidgetChild_h
9 #include "GtkCompositorWidget.h"
10 #include "mozilla/widget/PCompositorWidgetChild.h"
11 #include "mozilla/widget/CompositorWidgetVsyncObserver.h"
13 namespace mozilla {
14 namespace widget {
16 class CompositorWidgetChild final : public PCompositorWidgetChild,
17 public PlatformCompositorWidgetDelegate {
18 public:
19 CompositorWidgetChild(RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher,
20 RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver,
21 const CompositorWidgetInitData&);
22 ~CompositorWidgetChild() override;
24 bool Initialize();
26 mozilla::ipc::IPCResult RecvObserveVsync() override;
27 mozilla::ipc::IPCResult RecvUnobserveVsync() override;
29 void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override;
30 void CleanupResources() override;
31 void SetRenderingSurface(const uintptr_t aXWindow,
32 const bool aShaped) override;
34 private:
35 RefPtr<CompositorVsyncDispatcher> mVsyncDispatcher;
36 RefPtr<CompositorWidgetVsyncObserver> mVsyncObserver;
39 } // namespace widget
40 } // namespace mozilla
42 #endif // widget_gtk_CompositorWidgetChild_h