# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//media/gpu/args.gni")
import("//testing/test.gni")
shared_library("fake_drv_video") {
sources = [ "fake_drv_video.cc" ]
deps = [
":fake_libva_driver_internals",
"//base",
"//third_party/libyuv",
]
}
source_set("fake_libva_driver_internals") {
visibility = [ ":fake_drv_video" ]
sources = [
"av1_decoder_delegate.cc",
"av1_decoder_delegate.h",
"context_delegate.h",
"fake_buffer.cc",
"fake_buffer.h",
"fake_config.cc",
"fake_config.h",
"fake_context.cc",
"fake_context.h",
"fake_driver.cc",
"fake_driver.h",
"fake_image.cc",
"fake_image.h",
"fake_surface.cc",
"fake_surface.h",
"no_op_context_delegate.cc",
"no_op_context_delegate.h",
"object_tracker.h",
"scoped_bo_mapping_factory.cc",
"scoped_bo_mapping_factory.h",
"vpx_decoder_delegate.cc",
"vpx_decoder_delegate.h",
]
deps = [
"//base",
"//build/config/linux/libdrm",
"//third_party/dav1d",
"//third_party/libvpx",
"//third_party/libyuv",
"//ui/gfx/linux:gbm",
]
public_deps = [ "//third_party/minigbm" ]
}
test("fake_libva_driver_unittest") {
# Depending on //media/gpu/vaapi:libva_stubs only works on Linux or ChromeOS
# with VA-API.
assert(is_linux || is_chromeos)
assert(use_vaapi)
sources = [ "fake_drv_video_unittest.cc" ]
deps = [
":fake_drv_video",
"//base",
"//base/test:test_support",
"//build/config/linux/libdrm",
"//media/gpu/vaapi:libva_stubs",
"//testing/gtest",
]
}