chromium/ui/gfx/linux/test/mock_gbm_device.cc

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

#include "ui/gfx/linux/test/mock_gbm_device.h"

#include <xf86drm.h>
#include <memory>
#include <utility>

#include "base/check_op.h"
#include "base/containers/contains.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/numerics/safe_math.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "ui/gfx/linux/drm_util_linux.h"
#include "ui/gfx/linux/gbm_buffer.h"

namespace ui {
namespace {

base::ScopedFD MakeFD() {}

class MockGbmBuffer final : public ui::GbmBuffer {};

}  // namespace

MockGbmDevice::MockGbmDevice() = default;

MockGbmDevice::~MockGbmDevice() = default;

void MockGbmDevice::set_allocation_failure(bool should_fail_allocations) {}

std::vector<uint64_t> MockGbmDevice::GetSupportedModifiers() const {}

std::unique_ptr<GbmBuffer> MockGbmDevice::CreateBuffer(uint32_t format,
                                                       const gfx::Size& size,
                                                       uint32_t flags) {}

std::unique_ptr<GbmBuffer> MockGbmDevice::CreateBufferWithModifiers(
    uint32_t format,
    const gfx::Size& size,
    uint32_t flags,
    const std::vector<uint64_t>& modifiers) {}

std::unique_ptr<GbmBuffer> MockGbmDevice::CreateBufferFromHandle(
    uint32_t format,
    const gfx::Size& size,
    gfx::NativePixmapHandle handle) {}

bool MockGbmDevice::CanCreateBufferForFormat(uint32_t format) {}

}  // namespace ui