chromium/content/browser/gpu/compositor_util.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/342213636): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "content/browser/gpu/compositor_util.h"

#include <stddef.h>

#include <algorithm>
#include <memory>
#include <utility>

#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/system/sys_info.h"
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/switches.h"
#include "components/viz/common/features.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/config/gpu_blocklist.h"
#include "gpu/config/gpu_driver_bug_list.h"
#include "gpu/config/gpu_driver_bug_workaround_type.h"
#include "gpu/config/gpu_feature_type.h"
#include "gpu/config/gpu_finch_features.h"
#include "gpu/config/gpu_switches.h"
#include "gpu/vulkan/buildflags.h"
#include "media/base/media_switches.h"
#include "media/media_buildflags.h"
#include "skia/buildflags.h"
#include "third_party/blink/public/common/switches.h"
#include "ui/base/ui_base_features.h"
#include "ui/gl/gl_switches.h"

namespace content {

namespace {

const int kMinRasterThreads =;
const int kMaxRasterThreads =;

const int kMinMSAASampleCount =;

enum class GpuFeatureInfoType {};

struct DisableInfo {};

struct GpuFeatureData {};

// Returns enabled/disabled based on a bool for when there is no GpuFeatureType.
gpu::GpuFeatureStatus GetFakeFeatureStatus(bool enabled) {}

// `force_disabled` should only be true when the feature status from
// `gpu_feature_info` is missing information. In general this should be avoided
// and GpuFeatureInfo should be made to be correct.
gpu::GpuFeatureStatus SafeGetFeatureStatus(
    const gpu::GpuFeatureInfo& gpu_feature_info,
    gpu::GpuFeatureType feature,
    bool force_disabled = false) {}

std::vector<GpuFeatureData> GetGpuFeatureData(
    const gpu::GpuFeatureInfo& gpu_feature_info,
    bool is_gpu_compositing_disabled) {}

base::Value GetFeatureStatusImpl(GpuFeatureInfoType type) {}

base::Value GetProblemsImpl(GpuFeatureInfoType type) {}

std::vector<std::string> GetDriverBugWorkaroundsImpl(GpuFeatureInfoType type) {}

}  // namespace

int NumberOfRendererRasterThreads() {}

bool IsZeroCopyUploadEnabled() {}

bool IsPartialRasterEnabled() {}

bool IsGpuMemoryBufferCompositorResourcesEnabled() {}

int GpuRasterizationMSAASampleCount() {}

bool IsMainFrameBeforeActivationEnabled() {}

base::Value GetFeatureStatus() {}

base::Value GetProblems() {}

std::vector<std::string> GetDriverBugWorkarounds() {}

base::Value GetFeatureStatusForHardwareGpu() {}

base::Value GetProblemsForHardwareGpu() {}

std::vector<std::string> GetDriverBugWorkaroundsForHardwareGpu() {}

}  // namespace content