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

Side by Side Diff: chrome/browser/gpu_util.cc

Issue 10796048: Disable force-compositing-mode experiment when using swiftshader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable entire experiment Created 8 years, 5 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 | « no previous file | 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) 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 "chrome/browser/gpu_util.h" 5 #include "chrome/browser/gpu_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 #if defined(OS_WIN) 186 #if defined(OS_WIN)
187 // Don't run the trial on Windows XP. 187 // Don't run the trial on Windows XP.
188 if (base::win::GetVersion() < base::win::VERSION_VISTA) 188 if (base::win::GetVersion() < base::win::VERSION_VISTA)
189 return; 189 return;
190 #elif defined(OS_MACOSX) 190 #elif defined(OS_MACOSX)
191 // Accelerated compositing is only implemented on Mac OSX 10.6 or later. 191 // Accelerated compositing is only implemented on Mac OSX 10.6 or later.
192 if (base::mac::IsOSLeopardOrEarlier()) 192 if (base::mac::IsOSLeopardOrEarlier())
193 return; 193 return;
194 #endif 194 #endif
195 195
196 // The performance of accelerated compositing is too low with software
197 // rendering.
198 if (content::GpuDataManager::GetInstance()->ShouldUseSoftwareRendering())
199 return;
200
196 // Don't activate the field trial if force-compositing-mode has been 201 // Don't activate the field trial if force-compositing-mode has been
197 // explicitly disabled from the command line. 202 // explicitly disabled from the command line.
198 if (CommandLine::ForCurrentProcess()->HasSwitch( 203 if (CommandLine::ForCurrentProcess()->HasSwitch(
199 switches::kDisableForceCompositingMode)) 204 switches::kDisableForceCompositingMode))
200 return; 205 return;
201 206
202 const base::FieldTrial::Probability kDivisor = 100; 207 const base::FieldTrial::Probability kDivisor = 100;
203 scoped_refptr<base::FieldTrial> trial( 208 scoped_refptr<base::FieldTrial> trial(
204 base::FieldTrialList::FactoryGetFieldTrial( 209 base::FieldTrialList::FactoryGetFieldTrial(
205 kForceCompositingModeFieldTrialName, kDivisor, 210 kForceCompositingModeFieldTrialName, kDivisor,
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 kGpuBlacklistFeatureHistogramNamesWin[i], 579 kGpuBlacklistFeatureHistogramNamesWin[i],
575 1, kNumWinSubVersions * kGpuFeatureNumStatus, 580 1, kNumWinSubVersions * kGpuFeatureNumStatus,
576 kNumWinSubVersions * kGpuFeatureNumStatus + 1, 581 kNumWinSubVersions * kGpuFeatureNumStatus + 1,
577 base::Histogram::kUmaTargetedHistogramFlag); 582 base::Histogram::kUmaTargetedHistogramFlag);
578 histogram_pointer->Add(GetGpuBlacklistHistogramValueWin(value)); 583 histogram_pointer->Add(GetGpuBlacklistHistogramValueWin(value));
579 #endif 584 #endif
580 } 585 }
581 } 586 }
582 587
583 } // namespace gpu_util; 588 } // namespace gpu_util;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698