VRLayerParent.h (1256B)
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 "mozilla/gfx/PVRLayerParent.h" 11 #include "gfxVR.h" 12 13 namespace mozilla { 14 namespace gfx { 15 16 class VRLayerParent : public PVRLayerParent { 17 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRLayerParent) 18 19 public: 20 VRLayerParent(uint32_t aVRDisplayID, const uint32_t aGroup); 21 virtual mozilla::ipc::IPCResult RecvSubmitFrame( 22 const layers::SurfaceDescriptor& aTexture, const uint64_t& aFrameId, 23 const gfx::Rect& aLeftEyeRect, const gfx::Rect& aRightEyeRect) override; 24 virtual mozilla::ipc::IPCResult RecvDestroy() override; 25 uint32_t GetGroup() const { return mGroup; } 26 27 protected: 28 virtual void ActorDestroy(ActorDestroyReason aWhy) override; 29 30 virtual ~VRLayerParent(); 31 void Destroy(); 32 33 bool mIPCOpen; 34 35 bool mDestroyed; 36 gfx::Rect mLeftEyeRect; 37 gfx::Rect mRightEyeRect; 38 uint32_t mGroup; 39 }; 40 41 } // namespace gfx 42 } // namespace mozilla 43 44 #endif