Bug 1690340 - Part 2: Use the new naming for the developer tools menu items. r=jdescottes
[gecko.git] / gfx / layers / TextureSync.h
bloba48646fcee18bb1778c05a0899d8bf5ac5e29517
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/. */
7 #ifndef MOZILLA_LAYERS_TEXTURESYNC_H
8 #define MOZILLA_LAYERS_TEXTURESYNC_H
10 #include "base/process.h"
12 #include "nsTArray.h"
13 #include "mozilla/layers/TextureSourceProvider.h"
15 #include "SharedMemory.h"
17 class MachReceiveMessage;
19 namespace mozilla {
20 namespace ipc {
21 struct MemoryPorts;
22 } // namespace ipc
24 namespace layers {
26 class TextureSync {
27 public:
28 static void RegisterTextureSourceProvider(
29 layers::TextureSourceProvider* aTextureSourceProvider);
30 static void UnregisterTextureSourceProvider(
31 layers::TextureSourceProvider* aTextureSourceProvider);
32 static void DispatchCheckTexturesForUnlock();
33 static void HandleWaitForTexturesMessage(MachReceiveMessage* rmsg,
34 ipc::MemoryPorts* ports);
35 static void UpdateTextureLocks(base::ProcessId aProcessId);
36 static bool WaitForTextures(base::ProcessId aProcessId,
37 const nsTArray<uint64_t>& aTextureIds);
38 static void SetTexturesLocked(base::ProcessId aProcessId,
39 const nsTArray<uint64_t>& aTextureIds);
40 static void SetTexturesUnlocked(base::ProcessId aProcessId,
41 const nsTArray<uint64_t>& aTextureIds);
42 static void Shutdown();
43 static void CleanupForPid(base::ProcessId aProcessId);
46 } // namespace layers
47 } // namespace mozilla
49 #endif