Bumping manifests a=b2g-bump
[gecko.git] / gfx / layers / ipc / FenceUtils.h
blobd513cc70cf1db490d85069a6eaff130944a4a433
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=8 et :
3 */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef IPC_FencerUtils_h
9 #define IPC_FencerUtils_h
11 #include "ipc/IPCMessageUtils.h"
13 /**
14 * FenceHandle is used for delivering Fence object via ipc.
16 #if MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
17 # include "mozilla/layers/FenceUtilsGonk.h"
18 #else
19 namespace mozilla {
20 namespace layers {
22 struct FenceHandleFromChild;
24 struct FenceHandle {
25 FenceHandle() {}
26 explicit FenceHandle(const FenceHandleFromChild& aFenceHandle) {}
27 bool operator==(const FenceHandle&) const { return false; }
28 bool IsValid() const { return false; }
29 void Merge(const FenceHandle& aFenceHandle) {}
32 struct FenceHandleFromChild {
33 FenceHandleFromChild() {}
34 explicit FenceHandleFromChild(const FenceHandle& aFence) {}
35 bool operator==(const FenceHandle&) const { return false; }
36 bool operator==(const FenceHandleFromChild&) const { return false; }
37 bool IsValid() const { return false; }
40 } // namespace layers
41 } // namespace mozilla
42 #endif // MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
44 namespace IPC {
46 #if MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
47 #else
48 template <>
49 struct ParamTraits<mozilla::layers::FenceHandle> {
50 typedef mozilla::layers::FenceHandle paramType;
51 static void Write(Message*, const paramType&) {}
52 static bool Read(const Message*, void**, paramType*) { return false; }
55 template <>
56 struct ParamTraits<mozilla::layers::FenceHandleFromChild> {
57 typedef mozilla::layers::FenceHandleFromChild paramType;
58 static void Write(Message*, const paramType&) {}
59 static bool Read(const Message*, void**, paramType*) { return false; }
61 #endif // MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
63 } // namespace IPC
65 #endif // IPC_FencerUtils_h