#include "gpu/config/gpu_switching.h"
#include "build/build_config.h"
#if BUILDFLAG(IS_MAC)
#include <OpenGL/OpenGL.h>
#endif
#include <vector>
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "gpu/config/gpu_driver_bug_workaround_type.h"
#include "gpu/config/gpu_info.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_switches.h"
#include "ui/gl/gpu_preference.h"
#if BUILDFLAG(IS_MAC)
#include "base/mac/mac_util.h"
#endif
namespace gpu {
namespace {
#if BUILDFLAG(IS_MAC)
typedef CGLPixelFormatObj PlatformPixelFormatObj;
#else
PlatformPixelFormatObj;
#endif
PlatformPixelFormatObj g_discrete_pixel_format_obj = …;
void ForceDiscreteGPU() { … }
}
bool SwitchableGPUsSupported(const GPUInfo& gpu_info,
const base::CommandLine& command_line) { … }
void InitializeSwitchableGPUs(
const std::vector<int32_t>& driver_bug_workarounds) { … }
void StopForceDiscreteGPU() { … }
}