2018-08-07 21:20:34 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef GFX_VR_GPU_PARENT_H
|
|
|
|
#define GFX_VR_GPU_PARENT_H
|
|
|
|
|
|
|
|
#include "mozilla/gfx/PVRGPUParent.h"
|
2018-12-29 01:09:44 +03:00
|
|
|
#include "VRService.h"
|
2018-08-07 21:20:34 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
|
|
|
class VRGPUParent final : public PVRGPUParent {
|
|
|
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRGPUParent)
|
|
|
|
|
2019-02-06 18:57:37 +03:00
|
|
|
friend class PVRGPUParent;
|
|
|
|
|
2018-08-07 21:20:34 +03:00
|
|
|
public:
|
|
|
|
static RefPtr<VRGPUParent> CreateForGPU(Endpoint<PVRGPUParent>&& aEndpoint);
|
2019-01-15 00:58:51 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
2019-01-12 01:51:48 +03:00
|
|
|
bool IsClosed();
|
2018-08-07 21:20:34 +03:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void Bind(Endpoint<PVRGPUParent>&& aEndpoint);
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvStartVRService();
|
|
|
|
mozilla::ipc::IPCResult RecvStopVRService();
|
2018-08-07 21:20:34 +03:00
|
|
|
|
|
|
|
private:
|
2019-01-15 00:58:51 +03:00
|
|
|
explicit VRGPUParent(ProcessId aChildProcessId);
|
|
|
|
~VRGPUParent();
|
|
|
|
|
2018-08-07 21:20:34 +03:00
|
|
|
void DeferredDestroy();
|
|
|
|
|
|
|
|
RefPtr<VRGPUParent> mSelfRef;
|
2018-10-09 05:41:00 +03:00
|
|
|
#if !defined(MOZ_WIDGET_ANDROID)
|
2018-08-07 21:20:34 +03:00
|
|
|
RefPtr<VRService> mVRService;
|
|
|
|
#endif
|
2019-01-12 01:51:48 +03:00
|
|
|
bool mClosed;
|
|
|
|
|
2018-12-29 01:09:44 +03:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(VRGPUParent);
|
2018-08-07 21:20:34 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2018-10-09 05:41:00 +03:00
|
|
|
#endif // GFX_VR_CONTENT_PARENT_H
|