VRGPUChild.h (1145B)
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_GPU_CHILD_H 8 #define GFX_VR_GPU_CHILD_H 9 10 #include "mozilla/gfx/PVRGPUChild.h" 11 12 namespace mozilla { 13 namespace gfx { 14 15 class VRGPUChild final : public PVRGPUChild { 16 public: 17 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRGPUChild, final); 18 19 static VRGPUChild* Get(); 20 static bool InitForGPUProcess(Endpoint<PVRGPUChild>&& aEndpoint); 21 static bool IsCreated(); 22 static void Shutdown(); 23 24 mozilla::ipc::IPCResult RecvNotifyPuppetComplete(); 25 mozilla::ipc::IPCResult RecvNotifyServiceStarted(); 26 27 virtual void ActorDestroy(ActorDestroyReason aWhy) override; 28 bool IsClosed(); 29 30 protected: 31 explicit VRGPUChild() : mClosed(false) {} 32 ~VRGPUChild() = default; 33 34 private: 35 DISALLOW_COPY_AND_ASSIGN(VRGPUChild); 36 37 bool mClosed; 38 }; 39 40 } // namespace gfx 41 } // namespace mozilla 42 43 #endif // GFX_VR_GPU_CHILD_H