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

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

Issue 7982034: Add a "disabled" field for GPU Blacklist entries. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/gpu/gpu_blacklist_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 base::AutoLock auto_lock(gpu_info_lock_); 401 base::AutoLock auto_lock(gpu_info_lock_);
402 gpu_feature_flags_ = gpu_blacklist->DetermineGpuFeatureFlags( 402 gpu_feature_flags_ = gpu_blacklist->DetermineGpuFeatureFlags(
403 GpuBlacklist::kOsAny, NULL, gpu_info_); 403 GpuBlacklist::kOsAny, NULL, gpu_info_);
404 } 404 }
405 405
406 // Notify clients that GpuInfo state has changed 406 // Notify clients that GpuInfo state has changed
407 RunGpuInfoUpdateCallbacks(); 407 RunGpuInfoUpdateCallbacks();
408 408
409 uint32 flags = gpu_feature_flags_.flags(); 409 uint32 flags = gpu_feature_flags_.flags();
410 uint32 max_entry_id = gpu_blacklist->max_entry_id(); 410 uint32 max_entry_id = gpu_blacklist->max_entry_id();
411 bool disabled = false;
411 if (flags == 0) { 412 if (flags == 0) {
412 UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerEntry", 413 UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerEntry",
413 0, max_entry_id + 1); 414 0, max_entry_id + 1);
414 } else { 415 } else {
415 std::vector<uint32> flag_entries; 416 std::vector<uint32> flag_entries;
416 gpu_blacklist->GetGpuFeatureFlagEntries( 417 gpu_blacklist->GetGpuFeatureFlagEntries(
417 GpuFeatureFlags::kGpuFeatureAll, flag_entries); 418 GpuFeatureFlags::kGpuFeatureAll, flag_entries, disabled);
418 DCHECK_GT(flag_entries.size(), 0u); 419 DCHECK_GT(flag_entries.size(), 0u);
419 for (size_t i = 0; i < flag_entries.size(); ++i) { 420 for (size_t i = 0; i < flag_entries.size(); ++i) {
420 UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerEntry", 421 UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerEntry",
421 flag_entries[i], max_entry_id + 1); 422 flag_entries[i], max_entry_id + 1);
422 } 423 }
423 } 424 }
424 425
426 // This counts how many users are affected by a disabled entry - this allows
427 // us to understand the impact of an entry before enable it.
428 std::vector<uint32> flag_disabled_entries;
429 disabled = true;
430 gpu_blacklist->GetGpuFeatureFlagEntries(
431 GpuFeatureFlags::kGpuFeatureAll, flag_disabled_entries, disabled);
432 for (size_t i = 0; i < flag_disabled_entries.size(); ++i) {
433 UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerDisabledEntry",
434 flag_disabled_entries[i], max_entry_id + 1);
435 }
436
425 const GpuFeatureFlags::GpuFeatureType kGpuFeatures[] = { 437 const GpuFeatureFlags::GpuFeatureType kGpuFeatures[] = {
426 GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas, 438 GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas,
427 GpuFeatureFlags::kGpuFeatureAcceleratedCompositing, 439 GpuFeatureFlags::kGpuFeatureAcceleratedCompositing,
428 GpuFeatureFlags::kGpuFeatureWebgl 440 GpuFeatureFlags::kGpuFeatureWebgl
429 }; 441 };
430 const std::string kGpuBlacklistFeatureHistogramNames[] = { 442 const std::string kGpuBlacklistFeatureHistogramNames[] = {
431 "GPU.BlacklistFeatureTestResults.Accelerated2dCanvas", 443 "GPU.BlacklistFeatureTestResults.Accelerated2dCanvas",
432 "GPU.BlacklistFeatureTestResults.AcceleratedCompositing", 444 "GPU.BlacklistFeatureTestResults.AcceleratedCompositing",
433 "GPU.BlacklistFeatureTestResults.Webgl" 445 "GPU.BlacklistFeatureTestResults.Webgl"
434 }; 446 };
(...skipping 30 matching lines...) Expand all
465 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 477 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
466 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || 478 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) ||
467 browser_command_line.GetSwitchValueASCII( 479 browser_command_line.GetSwitchValueASCII(
468 switches::kUseGL) == gfx::kGLImplementationOSMesaName) 480 switches::kUseGL) == gfx::kGLImplementationOSMesaName)
469 return NULL; 481 return NULL;
470 // No need to return an empty blacklist. 482 // No need to return an empty blacklist.
471 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) 483 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0)
472 return NULL; 484 return NULL;
473 return gpu_blacklist_.get(); 485 return gpu_blacklist_.get();
474 } 486 }
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_blacklist_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698