chromium/media/mojo/mojom/stable/native_pixmap_handle_mojom_traits.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/mojo/mojom/stable/native_pixmap_handle_mojom_traits.h"

#include "ui/gfx/native_pixmap_handle.h"

// This file contains a variety of conservative compile-time assertions that
// help us detect changes that may break the backward compatibility requirement
// of the StableVideoDecoder API. Specifically, we have static_asserts() that
// ensure the type of the gfx struct member is *exactly* the same as the
// corresponding mojo struct member. If this changes, we must be careful to
// validate ranges and avoid implicit conversions.
//
// If you need to make any changes to this file, please consult with
// [email protected] first.

namespace mojo {

// static
uint32_t StructTraits<
    media::stable::mojom::NativePixmapPlaneDataView,
    gfx::NativePixmapPlane>::stride(const gfx::NativePixmapPlane& plane) {}

// static
uint64_t StructTraits<
    media::stable::mojom::NativePixmapPlaneDataView,
    gfx::NativePixmapPlane>::offset(const gfx::NativePixmapPlane& plane) {}

// static
uint64_t StructTraits<
    media::stable::mojom::NativePixmapPlaneDataView,
    gfx::NativePixmapPlane>::size(const gfx::NativePixmapPlane& plane) {}

// static
mojo::PlatformHandle StructTraits<
    media::stable::mojom::NativePixmapPlaneDataView,
    gfx::NativePixmapPlane>::buffer_handle(gfx::NativePixmapPlane& plane) {}

// static
bool StructTraits<media::stable::mojom::NativePixmapPlaneDataView,
                  gfx::NativePixmapPlane>::
    Read(media::stable::mojom::NativePixmapPlaneDataView data,
         gfx::NativePixmapPlane* out) {}

// static
std::vector<gfx::NativePixmapPlane>& StructTraits<
    media::stable::mojom::NativePixmapHandleDataView,
    gfx::NativePixmapHandle>::planes(gfx::NativePixmapHandle& pixmap_handle) {}

// static
uint64_t
StructTraits<media::stable::mojom::NativePixmapHandleDataView,
             gfx::NativePixmapHandle>::modifier(const gfx::NativePixmapHandle&
                                                    pixmap_handle) {}

// static
bool StructTraits<media::stable::mojom::NativePixmapHandleDataView,
                  gfx::NativePixmapHandle>::
    Read(media::stable::mojom::NativePixmapHandleDataView data,
         gfx::NativePixmapHandle* out) {}

}  // namespace mojo