1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef GFX_VR_DISPLAY_PRESENTATION_H
8 #define GFX_VR_DISPLAY_PRESENTATION_H
10 #include "mozilla/RefPtr.h"
11 #include "mozilla/dom/VRDisplayBinding.h"
18 class VRDisplayClient
;
21 class VRDisplayPresentation final
{
22 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRDisplayPresentation
)
25 VRDisplayPresentation(VRDisplayClient
* aDisplayClient
,
26 const nsTArray
<dom::VRLayer
>& aLayers
, uint32_t aGroup
);
27 void UpdateLayers(const nsTArray
<mozilla::dom::VRLayer
>& aLayers
);
28 void UpdateXRWebGLLayer(dom::XRWebGLLayer
* aLayer
);
30 void GetDOMLayers(nsTArray
<dom::VRLayer
>& result
);
31 uint32_t GetGroup() const;
34 ~VRDisplayPresentation();
38 RefPtr
<VRDisplayClient
> mDisplayClient
;
39 nsTArray
<dom::VRLayer
> mDOMLayers
;
40 nsTArray
<RefPtr
<VRLayerChild
>> mLayers
;
45 } // namespace mozilla
47 #endif /* GFX_VR_DISPLAY_PRESENTAITON_H */