Bug 1755316 - Add audio tests with simultaneous processes r=alwu
[gecko.git] / widget / android / CompositorWidgetParent.h
blobc7170e713fce9bdc8053b2c19951a445512c874b
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_android_CompositorWidgetParent_h
7 #define widget_android_CompositorWidgetParent_h
9 #include "AndroidCompositorWidget.h"
10 #include "mozilla/VsyncDispatcher.h"
11 #include "mozilla/widget/PCompositorWidgetParent.h"
13 namespace mozilla {
14 namespace widget {
16 class CompositorWidgetParent final : public PCompositorWidgetParent,
17 public AndroidCompositorWidget {
18 public:
19 explicit CompositorWidgetParent(const CompositorWidgetInitData& aInitData,
20 const layers::CompositorOptions& aOptions);
21 ~CompositorWidgetParent() override;
23 // CompositorWidget overrides
25 nsIWidget* RealWidget() override;
26 void ObserveVsync(VsyncObserver* aObserver) override;
27 RefPtr<VsyncObserver> GetVsyncObserver() const override;
29 // AndroidCompositorWidget overrides
31 void OnCompositorSurfaceChanged() override;
33 private:
34 RefPtr<VsyncObserver> mVsyncObserver;
37 } // namespace widget
38 } // namespace mozilla
40 #endif // widget_android_CompositorWidgetParent_h