#ifndef UI_GL_GL_FEATURES_H_
#define UI_GL_GL_FEATURES_H_
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromecast_buildflags.h"
#include "ui/gl/buildflags.h"
#include "ui/gl/gl_export.h"
namespace features {
GL_EXPORT bool UseGpuVsync();
GL_EXPORT bool UseCompositorClockVSyncInterval();
#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER)
GL_EXPORT BASE_DECLARE_FEATURE(kDefaultPassthroughCommandDecoder);
GL_EXPORT BASE_DECLARE_FEATURE(kAddDelayToGLCompileShader);
#endif
#if BUILDFLAG(IS_WIN)
GL_EXPORT BASE_DECLARE_FEATURE(kUseCompositorClockVSyncInterval);
#endif
GL_EXPORT bool IsAndroidFrameDeadlineEnabled();
GL_EXPORT bool UsePassthroughCommandDecoder();
GL_EXPORT bool IsANGLEValidationEnabled();
GL_EXPORT bool IsANGLEPassthroughShadersAllowed();
GL_EXPORT void GetANGLEFeaturesFromCommandLineAndFinch(
const base::CommandLine* command_line,
std::vector<std::string>& enabled_angle_features,
std::vector<std::string>& disabled_angle_features);
#if BUILDFLAG(ENABLE_SWIFTSHADER)
GL_EXPORT BASE_DECLARE_FEATURE(kAllowSwiftShaderFallback);
#endif
GL_EXPORT bool IsSwiftShaderAllowedByCommandLine(
const base::CommandLine* command_line);
GL_EXPORT bool IsSwiftShaderAllowedByFeature();
GL_EXPORT bool IsSwiftShaderAllowed(const base::CommandLine* command_line);
#if BUILDFLAG(IS_WIN)
GL_EXPORT BASE_DECLARE_FEATURE(kAllowD3D11WarpFallback);
#endif
GL_EXPORT bool IsWARPAllowed(const base::CommandLine* command_line);
GL_EXPORT bool IsAnySoftwareGLAllowed(const base::CommandLine* command_line);
GL_EXPORT bool IsSoftwareGLFallbackDueToCrashesAllowed(
const base::CommandLine* command_line);
GL_EXPORT base::TimeDelta GetGLCompileShaderDelay();
#if BUILDFLAG(IS_ANDROID)
GL_EXPORT BASE_DECLARE_FEATURE(kAndroidLimitRgb565DisplayToApi32);
GL_EXPORT bool PreferRGB565ResourcesForDisplay();
#endif
}
#endif