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"
13 #include "mozilla/layers/TextureSourceProvider.h"
15 #include "SharedMemory.h"
17 class MachReceiveMessage
;
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
);
47 } // namespace mozilla