#include "gpu/config/gpu_preferences.h"
#include <string_view>
#include "base/base64.h"
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "base/system/sys_info.h"
#include "components/miracle_parameter/common/public/miracle_parameter.h"
#include "gpu/config/gpu_switches.h"
#include "gpu/ipc/common/gpu_preferences.mojom.h"
namespace gpu {
namespace {
#if !BUILDFLAG(IS_ANDROID)
size_t GetCustomGpuCacheSizeBytesIfExists(std::string_view switch_string) { … }
#endif
BASE_FEATURE(…);
MIRACLE_PARAMETER_FOR_INT(GetGpuDefaultMaxProgramCacheMemoryBytes,
kDefaultGpuDiskCacheSize,
"GpuDefaultMaxProgramCacheMemoryBytes",
kDefaultMaxProgramCacheMemoryBytes)
#if BUILDFLAG(IS_ANDROID)
MIRACLE_PARAMETER_FOR_INT(GetGpuLowEndMaxProgramCacheMemoryBytes,
kDefaultGpuDiskCacheSize,
"GpuLowEndMaxProgramCacheMemoryBytes",
kLowEndMaxProgramCacheMemoryBytes)
#endif
}
size_t GetDefaultGpuDiskCacheSize() { … }
std::string GrContextTypeToString(GrContextType type) { … }
GpuPreferences::GpuPreferences() = default;
GpuPreferences::GpuPreferences(const GpuPreferences& other) = default;
GpuPreferences::~GpuPreferences() = default;
std::string GpuPreferences::ToSwitchValue() { … }
bool GpuPreferences::FromSwitchValue(const std::string& data) { … }
}