chromium/media/gpu/chromeos/native_pixmap_frame_resource_unittest.cc

// Copyright 2024 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/gpu/chromeos/native_pixmap_frame_resource.h"

#include <stddef.h>
#include <stdint.h>

#include <optional>

#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "media/base/color_plane_layout.h"
#include "media/base/format_utils.h"
#include "media/base/video_frame.h"
#include "media/base/video_frame_layout.h"
#include "media/base/video_types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"

namespace media {

namespace {

// Creates a vector of file descriptors. Used to simulate a vector of DMABuf
// FDs.
std::vector<base::ScopedFD> CreateMockDMABufs(size_t num_planes) {}

// Creates a NativePixmapDmaBuf with valid strides and other metadata, but with
// FD's that reference a /dev/null instead of referencing a DMABuf.
scoped_refptr<const gfx::NativePixmapDmaBuf> CreateMockNativePixmapDmaBuf(
    VideoPixelFormat pixel_format,
    const gfx::Size& coded_size) {}

}  // namespace

class CreateTest : public ::testing::Test,
                   public ::testing::WithParamInterface<
                       std::tuple<gfx::Size, gfx::Rect, gfx::Size, bool>> {};

// Tests the size checks of NativePixmapFrameResource's DMABuf FD-based factory
// function.
TEST_P(CreateTest, CreateFromDMABufs) {}

// Tests the size checks of NativePixmapFrameResource's NativePixmapDmaBuf-based
// factory function.
TEST_P(CreateTest, CreateFromNativePixmapDmabuf) {}

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

}  // namespace media