summaryrefslogtreecommitdiff
path: root/chromium/content/browser/gpu/compositor_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/gpu/compositor_util.cc')
-rw-r--r--chromium/content/browser/gpu/compositor_util.cc58
1 files changed, 20 insertions, 38 deletions
diff --git a/chromium/content/browser/gpu/compositor_util.cc b/chromium/content/browser/gpu/compositor_util.cc
index 4cdcc399628..01dfeb93bde 100644
--- a/chromium/content/browser/gpu/compositor_util.cc
+++ b/chromium/content/browser/gpu/compositor_util.cc
@@ -99,18 +99,18 @@ const GpuFeatureData GetGpuFeatureData(
command_line.HasSwitch(switches::kDisableAccelerated2dCanvas),
DisableInfo::Problem(
"Accelerated 2D canvas is unavailable: either disabled "
- "via blacklist or the command line."),
+ "via blocklist or the command line."),
true},
{"gpu_compositing",
// TODO(sgilhuly): Replace with a check to see which backend is used for
// compositing; do the same for GPU rasterization if it's enabled. For now
- // assume that if GL is blacklisted, then Vulkan is also. Check GL to see
+ // assume that if GL is blocklisted, then Vulkan is also. Check GL to see
// if GPU compositing is disabled.
SafeGetFeatureStatus(gpu_feature_info,
gpu::GPU_FEATURE_TYPE_ACCELERATED_GL),
GpuDataManagerImpl::GetInstance()->IsGpuCompositingDisabled(),
DisableInfo::Problem(
- "Gpu compositing has been disabled, either via blacklist, about:flags "
+ "Gpu compositing has been disabled, either via blocklist, about:flags "
"or the command line. The browser will fall back to software "
"compositing and hardware acceleration will be unavailable."),
true},
@@ -119,43 +119,25 @@ const GpuFeatureData GetGpuFeatureData(
gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL),
command_line.HasSwitch(switches::kDisableWebGL),
DisableInfo::Problem(
- "WebGL has been disabled via blacklist or the command line."),
+ "WebGL has been disabled via blocklist or the command line."),
false},
- {"flash_3d",
- SafeGetFeatureStatus(gpu_feature_info, gpu::GPU_FEATURE_TYPE_FLASH3D),
- command_line.HasSwitch(switches::kDisableFlash3d),
- DisableInfo::Problem("Using 3d in flash has been disabled, either via "
- "blacklist, about:flags or the command line."),
- true},
- {"flash_stage3d",
- SafeGetFeatureStatus(gpu_feature_info,
- gpu::GPU_FEATURE_TYPE_FLASH_STAGE3D),
- command_line.HasSwitch(switches::kDisableFlashStage3d),
- DisableInfo::Problem(
- "Using Stage3d in Flash has been disabled, either via blacklist, "
- "about:flags or the command line."),
- true},
- {"flash_stage3d_baseline",
- SafeGetFeatureStatus(gpu_feature_info,
- gpu::GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE),
- command_line.HasSwitch(switches::kDisableFlashStage3d),
- DisableInfo::Problem(
- "Using Stage3d Baseline profile in Flash has been disabled, either "
- "via blacklist, about:flags or the command line."),
- true},
{"protected_video_decode",
SafeGetFeatureStatus(gpu_feature_info,
gpu::GPU_FEATURE_TYPE_PROTECTED_VIDEO_DECODE),
false,
DisableInfo::Problem(
- "Protected video decode has been disabled, via blacklist."),
+ "Protected video decode has been disabled, via blocklist."),
false},
{"video_decode",
SafeGetFeatureStatus(gpu_feature_info,
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
+#if defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
+ !command_line.HasSwitch(switches::kEnableAcceleratedVideoDecode),
+#else
command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
+#endif // defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
DisableInfo::Problem(
- "Accelerated video decode has been disabled, either via blacklist, "
+ "Accelerated video decode has been disabled, either via blocklist, "
"about:flags or the command line."),
true},
{"rasterization",
@@ -163,7 +145,7 @@ const GpuFeatureData GetGpuFeatureData(
gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION),
(command_line.HasSwitch(switches::kDisableGpuRasterization)),
DisableInfo::Problem(
- "Accelerated rasterization has been disabled, either via blacklist, "
+ "Accelerated rasterization has been disabled, either via blocklist, "
"about:flags or the command line."),
true},
{"oop_rasterization",
@@ -176,7 +158,7 @@ const GpuFeatureData GetGpuFeatureData(
gpu::GPU_FEATURE_TYPE_ACCELERATED_GL),
false /* disabled */, DisableInfo::NotProblem(),
false /* fallback_to_software */},
-#if defined(OS_MACOSX)
+#if defined(OS_MAC)
{"metal",
SafeGetFeatureStatus(gpu_feature_info, gpu::GPU_FEATURE_TYPE_METAL),
!base::FeatureList::IsEnabled(features::kMetal) /* disabled */,
@@ -207,7 +189,7 @@ const GpuFeatureData GetGpuFeatureData(
(command_line.HasSwitch(switches::kDisableWebGL) ||
command_line.HasSwitch(switches::kDisableWebGL2)),
DisableInfo::Problem(
- "WebGL2 has been disabled via blacklist or the command line."),
+ "WebGL2 has been disabled via blocklist or the command line."),
false},
{"skia_renderer", gpu::kGpuFeatureStatusEnabled,
!features::IsUsingSkiaRenderer(), DisableInfo::NotProblem(), false},
@@ -246,7 +228,7 @@ std::unique_ptr<base::DictionaryValue> GetFeatureStatusImpl(
status += "_software";
else
status += "_off";
- } else if (gpu_feature_data.status == gpu::kGpuFeatureStatusBlacklisted) {
+ } else if (gpu_feature_data.status == gpu::kGpuFeatureStatusBlocklisted) {
status = "unavailable_off";
} else if (gpu_feature_data.status == gpu::kGpuFeatureStatusSoftware) {
status = "unavailable_software";
@@ -292,10 +274,10 @@ std::unique_ptr<base::ListValue> GetProblemsImpl(GpuFeatureInfoType type) {
: manager->GetGpuFeatureInfoForHardwareGpu();
auto problem_list = std::make_unique<base::ListValue>();
- if (!gpu_feature_info.applied_gpu_blacklist_entries.empty()) {
- std::unique_ptr<gpu::GpuBlocklist> blacklist(gpu::GpuBlocklist::Create());
- blacklist->GetReasons(problem_list.get(), "disabledFeatures",
- gpu_feature_info.applied_gpu_blacklist_entries);
+ if (!gpu_feature_info.applied_gpu_blocklist_entries.empty()) {
+ std::unique_ptr<gpu::GpuBlocklist> blocklist(gpu::GpuBlocklist::Create());
+ blocklist->GetReasons(problem_list.get(), "disabledFeatures",
+ gpu_feature_info.applied_gpu_blocklist_entries);
}
if (!gpu_feature_info.applied_gpu_driver_bug_list_entries.empty()) {
std::unique_ptr<gpu::GpuDriverBugList> bug_list(
@@ -411,7 +393,7 @@ int NumberOfRendererRasterThreads() {
bool IsZeroCopyUploadEnabled() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
-#if defined(OS_MACOSX)
+#if defined(OS_MAC)
return !command_line.HasSwitch(blink::switches::kDisableZeroCopy);
#else
return command_line.HasSwitch(blink::switches::kEnableZeroCopy);
@@ -435,7 +417,7 @@ bool IsGpuMemoryBufferCompositorResourcesEnabled() {
return false;
}
-#if defined(OS_MACOSX)
+#if defined(OS_MAC)
return true;
#else
return false;