chromium/gpu/command_buffer/service/feature_info.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "gpu/command_buffer/service/feature_info.h"

#include <stddef.h>

#include <memory>
#include <set>
#include <string_view>
#include <vector>

#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "build/build_config.h"
#include "build/chromecast_buildflags.h"
#include "build/chromeos_buildflags.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/config/gpu_finch_features.h"
#include "gpu/config/gpu_switches.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_fence.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_switches.h"
#include "ui/gl/gl_version_info.h"

#if !BUILDFLAG(IS_MAC)
#include "ui/gl/gl_fence_egl.h"
#else
#include "base/mac/mac_util.h"
#endif

namespace gpu {
namespace gles2 {

namespace {

class ScopedPixelUnpackBufferOverride {};

bool IsWebGLDrawBuffersSupported(bool webglCompatibilityContext,
                                 GLenum depth_texture_internal_format,
                                 GLenum depth_stencil_texture_internal_format) {}

}  // anonymous namespace.

FeatureInfo::FeatureFlags::FeatureFlags() = default;

FeatureInfo::FeatureInfo() {}

FeatureInfo::FeatureInfo(
    const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds,
    const GpuFeatureInfo& gpu_feature_info)
    :{}

void FeatureInfo::InitializeBasicState(const base::CommandLine* command_line) {}

void FeatureInfo::Initialize(ContextType context_type,
                             bool is_passthrough_cmd_decoder,
                             const DisallowedFeatures& disallowed_features,
                             bool force_reinitialize) {}

void FeatureInfo::InitializeForTesting(
    const DisallowedFeatures& disallowed_features) {}

void FeatureInfo::InitializeForTesting() {}

void FeatureInfo::InitializeForTesting(ContextType context_type) {}

bool IsGL_REDSupportedOnFBOs() {}

void FeatureInfo::EnableEXTFloatBlend() {}

void FeatureInfo::EnableEXTColorBufferFloat() {}

void FeatureInfo::EnableEXTColorBufferHalfFloat() {}

void FeatureInfo::EnableEXTTextureFilterAnisotropic() {}

void FeatureInfo::EnableCHROMIUMColorBufferFloatRGBA() {}

void FeatureInfo::EnableCHROMIUMColorBufferFloatRGB() {}

void FeatureInfo::EnableOESDrawBuffersIndexed() {}

void FeatureInfo::EnableOESFboRenderMipmap() {}

void FeatureInfo::EnableOESTextureFloatLinear() {}

void FeatureInfo::EnableOESTextureHalfFloatLinear() {}

void FeatureInfo::EnableANGLEInstancedArrayIfPossible(
    const gfx::ExtensionSet& extensions) {}

void FeatureInfo::EnableWEBGLMultiDrawIfPossible(
    const gfx::ExtensionSet& extensions) {}

void FeatureInfo::InitializeFeatures() {}

void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
    const gfx::ExtensionSet& extensions) {}

bool FeatureInfo::IsES3Capable() const {}

void FeatureInfo::EnableES3Validators() {}

bool FeatureInfo::IsWebGLContext() const {}

bool FeatureInfo::IsWebGL1OrES2Context() const {}

bool FeatureInfo::IsWebGL2OrES3Context() const {}

bool FeatureInfo::IsWebGL2OrES3OrHigherContext() const {}

bool FeatureInfo::IsES31ForTestingContext() const {}

void FeatureInfo::AddExtensionString(std::string_view extension) {}

FeatureInfo::~FeatureInfo() = default;

}  // namespace gles2
}  // namespace gpu