/src/mozilla-central/gfx/vr/ipc/VRLayerParent.h
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #ifndef GFX_VR_LAYERPARENT_H |
8 | | #define GFX_VR_LAYERPARENT_H |
9 | | |
10 | | #include "VRManager.h" |
11 | | |
12 | | #include "mozilla/RefPtr.h" |
13 | | #include "mozilla/gfx/PVRLayerParent.h" |
14 | | #include "gfxVR.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace gfx { |
18 | | |
19 | | class VRLayerParent : public PVRLayerParent { |
20 | | NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRLayerParent) |
21 | | |
22 | | public: |
23 | | VRLayerParent(uint32_t aVRDisplayID, const uint32_t aGroup); |
24 | | virtual mozilla::ipc::IPCResult RecvSubmitFrame(const layers::SurfaceDescriptor &aTexture, |
25 | | const uint64_t& aFrameId, |
26 | | const gfx::Rect& aLeftEyeRect, |
27 | | const gfx::Rect& aRightEyeRect) override; |
28 | | virtual mozilla::ipc::IPCResult RecvDestroy() override; |
29 | 0 | uint32_t GetDisplayID() const { return mVRDisplayID; } |
30 | 0 | uint32_t GetGroup() const { return mGroup; } |
31 | | protected: |
32 | | virtual void ActorDestroy(ActorDestroyReason aWhy) override; |
33 | | |
34 | | virtual ~VRLayerParent(); |
35 | | void Destroy(); |
36 | | |
37 | | bool mIPCOpen; |
38 | | |
39 | | uint32_t mVRDisplayID; |
40 | | gfx::Rect mLeftEyeRect; |
41 | | gfx::Rect mRightEyeRect; |
42 | | uint32_t mGroup; |
43 | | }; |
44 | | |
45 | | } // namespace gfx |
46 | | } // namespace mozilla |
47 | | |
48 | | #endif |