Backed out 2 changesets (bug 1881078, bug 1879806) for causing dt failures @ devtools...
[gecko.git] / gfx / ipc / VsyncBridgeParent.h
blob1d1c5c7ef3f9dd2c16eedcb042c00f9d2e4e1d61
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 #ifndef include_gfx_ipc_VsyncBridgeParent_h
7 #define include_gfx_ipc_VsyncBridgeParent_h
9 #include "mozilla/RefPtr.h"
10 #include "mozilla/gfx/PVsyncBridgeParent.h"
12 namespace mozilla {
13 namespace layers {
14 class CompositorThreadHolder;
15 } // namespace layers
17 namespace gfx {
19 class VsyncBridgeParent final : public PVsyncBridgeParent {
20 public:
21 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VsyncBridgeParent, final)
23 static RefPtr<VsyncBridgeParent> Start(
24 Endpoint<PVsyncBridgeParent>&& aEndpoint);
26 mozilla::ipc::IPCResult RecvNotifyVsync(const VsyncEvent& aVsync,
27 const LayersId& aLayersId);
28 void ActorDestroy(ActorDestroyReason aWhy) override;
30 void Shutdown();
32 private:
33 VsyncBridgeParent();
34 ~VsyncBridgeParent();
36 void Open(Endpoint<PVsyncBridgeParent>&& aEndpoint);
37 void ShutdownImpl();
39 private:
40 bool mOpen;
41 RefPtr<layers::CompositorThreadHolder> mCompositorThreadRef;
44 } // namespace gfx
45 } // namespace mozilla
47 #endif // include_gfx_ipc_VsyncBridgeParent_h