1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
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"
14 * FenceHandle is used for delivering Fence object via ipc.
16 #if MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
17 # include "mozilla/layers/FenceUtilsGonk.h"
22 struct FenceHandleFromChild
;
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; }
41 } // namespace mozilla
42 #endif // MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
46 #if MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
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; }
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
65 #endif // IPC_FencerUtils_h