Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/layers/ipc/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  IOSurfacePort.h

  Sprache: C
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef mozilla_gfx_IOSurfacePort_h_
#define mozilla_gfx_IOSurfacePort_h_

#include "chrome/common/ipc_message_utils.h"

#ifdef XP_DARWIN
#  include "mozilla/UniquePtrExtensions.h"

template <typename T>
class CFTypeRefPtr;
struct __IOSurface;
typedef __IOSurface* IOSurfaceRef;
#endif

// This header file defines an IOSurface struct.
//
// It is a separate file for the following reasons:
// - Forward-declaring CFTypeRefPtr<IOSurfaceRef> correctly is tricky.
// - IOSurfaceRef.h defines global types like "Point" which can interfere with
// name resolution.
// - Smaller header files allow limiting the scope of the name pollution.

namespace mozilla::layers {

// The IPC descriptor for an IOSurface.
// As long as the port is alive, the IOSurface is automatically marked as "in
// use", including while the port is in IPC transit.
struct IOSurfacePort {
#ifdef XP_DARWIN
  UniqueMachSendRight mPort;

  CFTypeRefPtr<IOSurfaceRef> GetSurface() const;
  static IOSurfacePort FromSurface(const CFTypeRefPtr<IOSurfaceRef>& aSurface);

  bool operator==(const IOSurfacePort& aOther) const;
#endif
};

}  // namespace mozilla::layers

namespace IPC {

template <>
struct ParamTraits<mozilla::layers::IOSurfacePort> {
  using paramType = mozilla::layers::IOSurfacePort;

  static void Write(MessageWriter* writer, paramType&& param) {
#ifdef XP_DARWIN
    WriteParam(writer, std::move(param.mPort));
#endif
  }
  static bool Read(MessageReader* reader, paramType* result) {
#ifdef XP_DARWIN
    return ReadParam(reader, &result->mPort);
#else
    return true;
#endif
  }
};

}  // namespace IPC

#endif /* mozilla_gfx_IOSurfacePort_h_ */

Messung V0.5 in Prozent
C=95 H=100 G=97

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.