#include "content/browser/gpu/gpu_memory_buffer_manager_singleton.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "components/viz/host/gpu_host_impl.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "gpu/ipc/common/gpu_memory_buffer_support.h"
#include "ui/base/ozone_buildflags.h"
#include "ui/base/ui_base_features.h"
#if BUILDFLAG(IS_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#elif BUILDFLAG(IS_MAC)
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
#endif
namespace content {
namespace {
GpuMemoryBufferManagerSingleton* g_gpu_memory_buffer_manager;
viz::mojom::GpuService* GetGpuService(
base::OnceClosure connection_error_handler) { … }
#if BUILDFLAG(IS_OZONE_X11)
bool ShouldSetBufferFormatsFromGpuExtraInfo() { … }
#endif
scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() { … }
#if BUILDFLAG(IS_LINUX)
bool IsGpuMemoryBufferNV12Supported() { … }
#endif
}
GpuMemoryBufferManagerSingleton::GpuMemoryBufferManagerSingleton(int client_id)
: … { … }
GpuMemoryBufferManagerSingleton::~GpuMemoryBufferManagerSingleton() { … }
GpuMemoryBufferManagerSingleton*
GpuMemoryBufferManagerSingleton::GetInstance() { … }
void GpuMemoryBufferManagerSingleton::OnGpuExtraInfoUpdate() { … }
}