#include "components/viz/service/display_embedder/compositor_gpu_thread.h"
#include <utility>
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/bind_post_task.h"
#include "build/build_config.h"
#include "components/viz/common/features.h"
#include "components/viz/common/gpu/vulkan_context_provider.h"
#include "components/viz/common/switches.h"
#include "gpu/command_buffer/service/service_utils.h"
#include "gpu/config/gpu_finch_features.h"
#include "gpu/ipc/common/gpu_client_ids.h"
#include "gpu/ipc/service/gpu_channel_manager.h"
#include "gpu/vulkan/buildflags.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_features.h"
#include "ui/gl/gl_surface_egl.h"
#include "ui/gl/init/gl_factory.h"
#if BUILDFLAG(ENABLE_VULKAN)
#include "components/viz/common/gpu/vulkan_in_process_context_provider.h"
#include "gpu/vulkan/vulkan_device_queue.h"
#include "gpu/vulkan/vulkan_implementation.h"
#endif
#if BUILDFLAG(SKIA_USE_DAWN)
#include "gpu/command_buffer/service/dawn_context_provider.h"
#endif
namespace viz {
std::unique_ptr<CompositorGpuThread> CompositorGpuThread::MaybeCreate(
const CreateParams& params) { … }
CompositorGpuThread::CompositorGpuThread(
gpu::GpuChannelManager* gpu_channel_manager,
gl::GLDisplay* display,
bool enable_watchdog)
: … { … }
CompositorGpuThread::~CompositorGpuThread() { … }
scoped_refptr<gpu::SharedContextState>
CompositorGpuThread::GetSharedContextState() { … }
bool CompositorGpuThread::Initialize() { … }
void CompositorGpuThread::HandleMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { … }
void CompositorGpuThread::Init() { … }
void CompositorGpuThread::CleanUp() { … }
void CompositorGpuThread::OnMemoryAllocatedChange(
gpu::CommandBufferId id,
uint64_t old_size,
uint64_t new_size,
gpu::GpuPeakMemoryAllocationSource source) { … }
void CompositorGpuThread::OnBackgrounded() { … }
void CompositorGpuThread::OnBackgroundedOnCompositorGpuThread() { … }
void CompositorGpuThread::OnBackgroundCleanup() { … }
void CompositorGpuThread::OnForegrounded() { … }
void CompositorGpuThread::LoseContext() { … }
}