1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
gpu / config / gpu_finch_features.h [blame]
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file defines all the public base::FeatureList features for the gpu
// module.
#ifndef GPU_CONFIG_GPU_FINCH_FEATURES_H_
#define GPU_CONFIG_GPU_FINCH_FEATURES_H_
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "build/build_config.h"
#include "gpu/gpu_export.h"
namespace base {
class CommandLine;
} // namespace base
namespace features {
GPU_EXPORT BASE_DECLARE_FEATURE(kUseGles2ForOopR);
// All features in alphabetical order. The features should be documented
// alongside the definition of their values in the .cc file.
GPU_EXPORT BASE_DECLARE_FEATURE(kAggressiveShaderCacheLimits);
#if BUILDFLAG(IS_ANDROID)
GPU_EXPORT BASE_DECLARE_FEATURE(kAndroidSurfaceControl);
GPU_EXPORT BASE_DECLARE_FEATURE(kWebViewSurfaceControl);
GPU_EXPORT BASE_DECLARE_FEATURE(kWebViewSurfaceControlForTV);
GPU_EXPORT BASE_DECLARE_FEATURE(kLimitAImageReaderMaxSizeToOne);
GPU_EXPORT BASE_DECLARE_FEATURE(kWebViewThreadSafeMediaDefault);
GPU_EXPORT BASE_DECLARE_FEATURE(kUseHardwareBufferUsageFlagsFromVulkan);
GPU_EXPORT BASE_DECLARE_FEATURE(
kAllowHardwareBufferUsageFlagsFromVulkanForScanout);
#endif // BUILDFLAG(IS_ANDROID)
GPU_EXPORT BASE_DECLARE_FEATURE(kDefaultEnableGpuRasterization);
#if !BUILDFLAG(IS_ANDROID)
GPU_EXPORT BASE_DECLARE_FEATURE(kCanvasOopRasterization);
#endif
GPU_EXPORT BASE_DECLARE_FEATURE(kEnableMSAAOnNewIntelGPUs);
#if BUILDFLAG(IS_WIN)
GPU_EXPORT BASE_DECLARE_FEATURE(kNoUndamagedOverlayPromotion);
#endif
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_IOS)
GPU_EXPORT BASE_DECLARE_FEATURE(kAdjustGpuProcessPriority);
#endif
GPU_EXPORT BASE_DECLARE_FEATURE(kClearGrShaderDiskCacheOnInvalidPrefix);
GPU_EXPORT BASE_DECLARE_FEATURE(kVaapiJpegImageDecodeAcceleration);
GPU_EXPORT BASE_DECLARE_FEATURE(kVaapiWebPImageDecodeAcceleration);
GPU_EXPORT BASE_DECLARE_FEATURE(kVulkan);
#if BUILDFLAG(IS_OZONE)
GPU_EXPORT BASE_DECLARE_FEATURE(
kSharedImageSupportScanoutOnOzoneOnlyIfOverlaysSupported);
#endif
GPU_EXPORT BASE_DECLARE_FEATURE(kSkiaGraphite);
GPU_EXPORT BASE_DECLARE_FEATURE(kSkiaGraphitePrecompilation);
GPU_EXPORT extern const base::FeatureParam<bool>
kSkiaGraphiteDawnSkipValidation;
GPU_EXPORT extern const base::FeatureParam<bool>
kSkiaGraphiteDawnBackendValidation;
#if BUILDFLAG(IS_WIN)
GPU_EXPORT BASE_DECLARE_FEATURE(kSkiaGraphiteDawnUseD3D12);
#endif
GPU_EXPORT BASE_DECLARE_FEATURE(
kCameraVideoFrameHandlerAddScanoutUsageOnlyIfSupportedBySharedImage);
GPU_EXPORT BASE_DECLARE_FEATURE(
kExoBufferAddScanoutUsageOnlyIfSupportedBySharedImage);
GPU_EXPORT BASE_DECLARE_FEATURE(
kFastInkHostAddScanoutUsageOnlyIfSupportedBySharedImage);
GPU_EXPORT BASE_DECLARE_FEATURE(
kRoundedDisplayAddScanoutUsageOnlyIfSupportedBySharedImage);
GPU_EXPORT BASE_DECLARE_FEATURE(
kSWVideoFrameAddScanoutUsageOnlyIfSupportedBySharedImage);
GPU_EXPORT BASE_DECLARE_FEATURE(
kViewTreeHostAddScanoutUsageOnlyIfSupportedBySharedImage);
GPU_EXPORT BASE_DECLARE_FEATURE(kConditionallySkipGpuChannelFlush);
GPU_EXPORT BASE_DECLARE_FEATURE(kEnableVkPipelineCache);
GPU_EXPORT BASE_DECLARE_FEATURE(kNoDiscardableMemoryForGpuDecodePath);
GPU_EXPORT BASE_DECLARE_FEATURE(kEnableDrDc);
GPU_EXPORT BASE_DECLARE_FEATURE(kPruneOldTransferCacheEntries);
#if BUILDFLAG(IS_ANDROID)
// This flag is use additionally with kEnableDrDc to enable the feature for
// vulkan enabled android devices.
GPU_EXPORT BASE_DECLARE_FEATURE(kEnableDrDcVulkan);
#endif // BUILDFLAG(IS_ANDROID)
GPU_EXPORT BASE_DECLARE_FEATURE(kWebGPUService);
GPU_EXPORT BASE_DECLARE_FEATURE(kWebGPUBlobCache);
GPU_EXPORT BASE_DECLARE_FEATURE(kWebGPUUseDXC);
GPU_EXPORT BASE_DECLARE_FEATURE(kWebGPUUseTintIR);
GPU_EXPORT extern const base::FeatureParam<std::string> kWebGPUUnsafeFeatures;
GPU_EXPORT extern const base::FeatureParam<std::string> kWGSLUnsafeFeatures;
GPU_EXPORT BASE_DECLARE_FEATURE(kIncreasedCmdBufferParseSlice);
GPU_EXPORT BASE_DECLARE_FEATURE(kDeferredOverlaysRelease);
#if BUILDFLAG(IS_WIN)
GPU_EXPORT BASE_DECLARE_FEATURE(kD3DBackingUploadWithUpdateSubresource);
#endif
GPU_EXPORT BASE_DECLARE_FEATURE(kHandleOverlaysSwapFailure);
GPU_EXPORT BASE_DECLARE_FEATURE(kGPUBlockListTestGroup);
GPU_EXPORT extern const base::FeatureParam<int> kGPUBlockListTestGroupId;
GPU_EXPORT BASE_DECLARE_FEATURE(kGPUDriverBugListTestGroup);
GPU_EXPORT extern const base::FeatureParam<int> kGPUDriverBugListTestGroupId;
GPU_EXPORT bool UseGles2ForOopR();
GPU_EXPORT bool IsUsingVulkan();
GPU_EXPORT bool IsDrDcEnabled();
GPU_EXPORT bool NeedThreadSafeAndroidMedia();
GPU_EXPORT bool IsSkiaGraphiteEnabled(const base::CommandLine* command_line);
GPU_EXPORT bool IsSkiaGraphitePrecompilationEnabled(
const base::CommandLine* command_line);
GPU_EXPORT bool EnablePurgeGpuImageDecodeCache();
GPU_EXPORT bool EnablePruneOldTransferCacheEntries();
GPU_EXPORT bool IsCanvasOopRasterizationEnabled();
#if BUILDFLAG(IS_ANDROID)
GPU_EXPORT bool IsAndroidSurfaceControlEnabled();
GPU_EXPORT bool LimitAImageReaderMaxSizeToOne();
GPU_EXPORT bool IncreaseBufferCountForHighFrameRate();
GPU_EXPORT bool IncreaseBufferCountForWebViewOverlays();
#endif
GPU_EXPORT BASE_DECLARE_FEATURE(kSyncPointGraphValidation);
GPU_EXPORT bool IsSyncPointGraphValidationEnabled();
GPU_EXPORT BASE_DECLARE_FEATURE(kANGLEPerContextBlobCache);
} // namespace features
#endif // GPU_CONFIG_GPU_FINCH_FEATURES_H_