OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gpu_data_manager.h" | 5 #include "content/browser/gpu/gpu_data_manager.h" |
6 | 6 |
7 #if defined(OS_MACOSX) | 7 #if defined(OS_MACOSX) |
8 #include <CoreGraphics/CGDisplayConfiguration.h> | 8 #include <CoreGraphics/CGDisplayConfiguration.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 std::vector<uint32> flag_entries; | 415 std::vector<uint32> flag_entries; |
416 gpu_blacklist->GetGpuFeatureFlagEntries( | 416 gpu_blacklist->GetGpuFeatureFlagEntries( |
417 GpuFeatureFlags::kGpuFeatureAll, flag_entries); | 417 GpuFeatureFlags::kGpuFeatureAll, flag_entries); |
418 DCHECK_GT(flag_entries.size(), 0u); | 418 DCHECK_GT(flag_entries.size(), 0u); |
419 for (size_t i = 0; i < flag_entries.size(); ++i) { | 419 for (size_t i = 0; i < flag_entries.size(); ++i) { |
420 UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerEntry", | 420 UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerEntry", |
421 flag_entries[i], max_entry_id + 1); | 421 flag_entries[i], max_entry_id + 1); |
422 } | 422 } |
423 } | 423 } |
424 | 424 |
| 425 // This counts how many users are affected by a disabled entry - this allows |
| 426 // us to understand the impact of an entry before enable it. |
| 427 std::vector<uint32> flag_disabled_entries; |
| 428 gpu_blacklist->GetGpuFeatureFlagDisabledEntries( |
| 429 GpuFeatureFlags::kGpuFeatureAll, flag_disabled_entries); |
| 430 for (size_t i = 0; i < flag_disabled_entries.size(); ++i) { |
| 431 UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerDisabledEntry", |
| 432 flag_disabled_entries[i], max_entry_id + 1); |
| 433 } |
| 434 |
425 const GpuFeatureFlags::GpuFeatureType kGpuFeatures[] = { | 435 const GpuFeatureFlags::GpuFeatureType kGpuFeatures[] = { |
426 GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas, | 436 GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas, |
427 GpuFeatureFlags::kGpuFeatureAcceleratedCompositing, | 437 GpuFeatureFlags::kGpuFeatureAcceleratedCompositing, |
428 GpuFeatureFlags::kGpuFeatureWebgl | 438 GpuFeatureFlags::kGpuFeatureWebgl |
429 }; | 439 }; |
430 const std::string kGpuBlacklistFeatureHistogramNames[] = { | 440 const std::string kGpuBlacklistFeatureHistogramNames[] = { |
431 "GPU.BlacklistFeatureTestResults.Accelerated2dCanvas", | 441 "GPU.BlacklistFeatureTestResults.Accelerated2dCanvas", |
432 "GPU.BlacklistFeatureTestResults.AcceleratedCompositing", | 442 "GPU.BlacklistFeatureTestResults.AcceleratedCompositing", |
433 "GPU.BlacklistFeatureTestResults.Webgl" | 443 "GPU.BlacklistFeatureTestResults.Webgl" |
434 }; | 444 }; |
(...skipping 30 matching lines...) Expand all Loading... |
465 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 475 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
466 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || | 476 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || |
467 browser_command_line.GetSwitchValueASCII( | 477 browser_command_line.GetSwitchValueASCII( |
468 switches::kUseGL) == gfx::kGLImplementationOSMesaName) | 478 switches::kUseGL) == gfx::kGLImplementationOSMesaName) |
469 return NULL; | 479 return NULL; |
470 // No need to return an empty blacklist. | 480 // No need to return an empty blacklist. |
471 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) | 481 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) |
472 return NULL; | 482 return NULL; |
473 return gpu_blacklist_.get(); | 483 return gpu_blacklist_.get(); |
474 } | 484 } |
OLD | NEW |