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"
16 class CompositorWidgetParent final
: public PCompositorWidgetParent
,
17 public AndroidCompositorWidget
{
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
;
34 RefPtr
<VsyncObserver
> mVsyncObserver
;
38 } // namespace mozilla
40 #endif // widget_android_CompositorWidgetParent_h