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

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

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: fix win clang build Created 3 years, 10 months 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>
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 return false; 235 return false;
236 236
237 #if defined(OS_MACOSX) 237 #if defined(OS_MACOSX)
238 return true; 238 return true;
239 #else 239 #else
240 return false; 240 return false;
241 #endif 241 #endif
242 } 242 }
243 243
244 bool IsGpuRasterizationEnabled() { 244 bool IsGpuRasterizationEnabled() {
245 const base::CommandLine& command_line = 245 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
246 *base::CommandLine::ForCurrentProcess(); 246 return manager->IsFeatureEnabled(gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION);
247
248 if (command_line.HasSwitch(switches::kDisableGpuRasterization))
249 return false;
250 else if (command_line.HasSwitch(switches::kEnableGpuRasterization))
251 return true;
252
253 if (IsGpuRasterizationBlacklisted()) {
254 return false;
255 }
256
257 // Gpu Rasterization on platforms that are not fully enabled is controlled by
258 // a finch experiment.
259 return base::FeatureList::IsEnabled(features::kDefaultEnableGpuRasterization);
260 } 247 }
261 248
262 bool IsAsyncWorkerContextEnabled() { 249 bool IsAsyncWorkerContextEnabled() {
263 const base::CommandLine& command_line = 250 const base::CommandLine& command_line =
264 *base::CommandLine::ForCurrentProcess(); 251 *base::CommandLine::ForCurrentProcess();
265 252
266 if (command_line.HasSwitch(switches::kDisableGpuAsyncWorkerContext)) 253 if (command_line.HasSwitch(switches::kDisableGpuAsyncWorkerContext))
267 return false; 254 return false;
268 else if (command_line.HasSwitch(switches::kEnableGpuAsyncWorkerContext)) 255 else if (command_line.HasSwitch(switches::kEnableGpuAsyncWorkerContext))
269 return true; 256 return true;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 400 }
414 } 401 }
415 return problem_list; 402 return problem_list;
416 } 403 }
417 404
418 std::vector<std::string> GetDriverBugWorkarounds() { 405 std::vector<std::string> GetDriverBugWorkarounds() {
419 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); 406 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds();
420 } 407 }
421 408
422 } // namespace content 409 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/browser/gpu/gpu_data_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698