gfx/layers/ipc/FenceUtils.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/layers/ipc/FenceUtils.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,43 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + * vim: sw=2 ts=8 et :
     1.6 + */
     1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +#ifndef IPC_FencerUtils_h
    1.12 +#define IPC_FencerUtils_h
    1.13 +
    1.14 +#include "ipc/IPCMessageUtils.h"
    1.15 +
    1.16 +/**
    1.17 + * FenceHandle is used for delivering Fence object via ipc.
    1.18 + */
    1.19 +#if MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
    1.20 +# include "mozilla/layers/FenceUtilsGonk.h"
    1.21 +#else
    1.22 +namespace mozilla {
    1.23 +namespace layers {
    1.24 +struct FenceHandle {
    1.25 +  bool operator==(const FenceHandle&) const { return false; }
    1.26 +  bool IsValid() const { return false; }
    1.27 +};
    1.28 +} // namespace layers
    1.29 +} // namespace mozilla
    1.30 +#endif // MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
    1.31 +
    1.32 +namespace IPC {
    1.33 +
    1.34 +#if MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
    1.35 +#else
    1.36 +template <>
    1.37 +struct ParamTraits<mozilla::layers::FenceHandle> {
    1.38 +  typedef mozilla::layers::FenceHandle paramType;
    1.39 +  static void Write(Message*, const paramType&) {}
    1.40 +  static bool Read(const Message*, void**, paramType*) { return false; }
    1.41 +};
    1.42 +#endif // MOZ_WIDGET_GONK && ANDROID_VERSION >= 17
    1.43 +
    1.44 +} // namespace IPC
    1.45 +
    1.46 +#endif // IPC_FencerUtils_h

mercurial