Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(931)

Side by Side Diff: content/browser/gpu/compositor_util.cc

Issue 2517953003: Move enable_webrtc to a buildflag header. (Closed)
Patch Set: Fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/compositor_util.h" 5 #include "content/browser/gpu/compositor_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/feature_list.h" 13 #include "base/feature_list.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/metrics/field_trial.h" 17 #include "base/metrics/field_trial.h"
18 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
19 #include "base/sys_info.h" 19 #include "base/sys_info.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "cc/base/math_util.h" 21 #include "cc/base/math_util.h"
22 #include "cc/base/switches.h" 22 #include "cc/base/switches.h"
23 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 23 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
24 #include "content/browser/gpu/gpu_data_manager_impl.h" 24 #include "content/browser/gpu/gpu_data_manager_impl.h"
25 #include "content/public/browser/gpu_utils.h" 25 #include "content/public/browser/gpu_utils.h"
26 #include "content/public/common/content_features.h" 26 #include "content/public/common/content_features.h"
27 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
28 #include "gpu/config/gpu_feature_type.h" 28 #include "gpu/config/gpu_feature_type.h"
29 #include "media/media_features.h"
29 #include "ui/gl/gl_switches.h" 30 #include "ui/gl/gl_switches.h"
30 31
31 namespace content { 32 namespace content {
32 33
33 namespace { 34 namespace {
34 35
35 static bool IsGpuRasterizationBlacklisted() { 36 static bool IsGpuRasterizationBlacklisted() {
36 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); 37 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
37 return manager->IsFeatureBlacklisted( 38 return manager->IsFeatureBlacklisted(
38 gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION); 39 gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 command_line.HasSwitch(switches::kDisableFlashStage3d), 107 command_line.HasSwitch(switches::kDisableFlashStage3d),
107 "Using Stage3d Baseline profile in Flash has been disabled, either" 108 "Using Stage3d Baseline profile in Flash has been disabled, either"
108 " via blacklist, about:flags or the command line.", 109 " via blacklist, about:flags or the command line.",
109 true}, 110 true},
110 {"video_decode", manager->IsFeatureBlacklisted( 111 {"video_decode", manager->IsFeatureBlacklisted(
111 gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE), 112 gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
112 command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode), 113 command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
113 "Accelerated video decode has been disabled, either via blacklist," 114 "Accelerated video decode has been disabled, either via blacklist,"
114 " about:flags or the command line.", 115 " about:flags or the command line.",
115 true}, 116 true},
116 #if defined(ENABLE_WEBRTC) 117 #if BUILDFLAG(ENABLE_WEBRTC)
117 {"video_encode", manager->IsFeatureBlacklisted( 118 {"video_encode", manager->IsFeatureBlacklisted(
118 gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE), 119 gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE),
119 command_line.HasSwitch(switches::kDisableWebRtcHWEncoding), 120 command_line.HasSwitch(switches::kDisableWebRtcHWEncoding),
120 "Accelerated video encode has been disabled, either via blacklist," 121 "Accelerated video encode has been disabled, either via blacklist,"
121 " about:flags or the command line.", 122 " about:flags or the command line.",
122 true}, 123 true},
123 #endif 124 #endif
124 #if defined(OS_CHROMEOS) 125 #if defined(OS_CHROMEOS)
125 {"panel_fitting", 126 {"panel_fitting",
126 manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_PANEL_FITTING), 127 manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_PANEL_FITTING),
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 414 }
414 } 415 }
415 return problem_list; 416 return problem_list;
416 } 417 }
417 418
418 std::vector<std::string> GetDriverBugWorkarounds() { 419 std::vector<std::string> GetDriverBugWorkarounds() {
419 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); 420 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds();
420 } 421 }
421 422
422 } // namespace content 423 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/gpu/gpu_data_manager_impl_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698