#include "components/viz/host/host_gpu_memory_buffer_manager.h"
#include <string>
#include <utility>
#include <vector>
#include "base/clang_profiling_buildflags.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/unsafe_shared_memory_region.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "gpu/ipc/common/gpu_memory_buffer_support.h"
#include "gpu/ipc/common/surface_handle.h"
#include "media/media_buildflags.h"
#include "services/viz/privileged/mojom/gl/gpu_service.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/client_native_pixmap_factory.h"
#if BUILDFLAG(IS_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#endif
#if BUILDFLAG(IS_ANDROID)
#include "base/android/android_hardware_buffer_compat.h"
#endif
namespace viz {
namespace {
constexpr int kHostGpuMemoryBufferManagerId = …;
bool MustSignalGmbConfigReadyForTest() { … }
class TestGpuService : public mojom::GpuService { … };
}
class HostGpuMemoryBufferManagerTest : public ::testing::Test { … };
TEST_F(HostGpuMemoryBufferManagerTest, GpuMemoryBufferDestroyed) { … }
TEST_F(HostGpuMemoryBufferManagerTest,
GpuMemoryBufferDestroyedOnDifferentThread) { … }
TEST_F(HostGpuMemoryBufferManagerTest, AllocationRequestFromDeadGpuService) { … }
TEST_F(HostGpuMemoryBufferManagerTest, CancelRequestsForShutdown) { … }
}