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

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

Issue 10824271: Disable threaded compositing field trial on mac and linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // default (mac and windows only). 213 // default (mac and windows only).
214 #if defined(OS_WIN) || defined(OS_MACOSX) 214 #if defined(OS_WIN) || defined(OS_MACOSX)
215 force_compositing_mode_probability = 3; 215 force_compositing_mode_probability = 3;
216 #endif 216 #endif
217 } else if (channel == chrome::VersionInfo::CHANNEL_DEV || 217 } else if (channel == chrome::VersionInfo::CHANNEL_DEV ||
218 channel == chrome::VersionInfo::CHANNEL_CANARY) { 218 channel == chrome::VersionInfo::CHANNEL_CANARY) {
219 // Dev and Canary channels: force-compositing-mode and 219 // Dev and Canary channels: force-compositing-mode and
220 // threaded-compositing on with 1/3 probability each. 220 // threaded-compositing on with 1/3 probability each.
221 force_compositing_mode_probability = 1; 221 force_compositing_mode_probability = 1;
222 222
223 #if defined(OS_MACOSX) || defined(OS_LINUX)
224 // Threaded compositing mode isn't feature complete on mac or linux yet:
225 // http://crbug.com/133602 for mac
226 // http://crbug.com/140866 for linux
227 threaded_compositing_probability = 0;
228 #else
223 if (!CommandLine::ForCurrentProcess()->HasSwitch( 229 if (!CommandLine::ForCurrentProcess()->HasSwitch(
224 switches::kDisableThreadedCompositing)) 230 switches::kDisableThreadedCompositing))
225 threaded_compositing_probability = 1; 231 threaded_compositing_probability = 1;
232 #endif
226 } 233 }
227 234
235
228 int force_compositing_group = trial->AppendGroup( 236 int force_compositing_group = trial->AppendGroup(
229 content::kGpuCompositingFieldTrialForceCompositingEnabledName, 237 content::kGpuCompositingFieldTrialForceCompositingEnabledName,
230 force_compositing_mode_probability); 238 force_compositing_mode_probability);
231 int thread_group = trial->AppendGroup( 239 int thread_group = trial->AppendGroup(
232 content::kGpuCompositingFieldTrialThreadEnabledName, 240 content::kGpuCompositingFieldTrialThreadEnabledName,
233 threaded_compositing_probability); 241 threaded_compositing_probability);
234 242
235 bool force_compositing = (trial->group() == force_compositing_group); 243 bool force_compositing = (trial->group() == force_compositing_group);
236 bool thread = (trial->group() == thread_group); 244 bool thread = (trial->group() == thread_group);
237 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial", 245 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial",
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 kGpuBlacklistFeatureHistogramNamesWin[i], 622 kGpuBlacklistFeatureHistogramNamesWin[i],
615 1, kNumWinSubVersions * kGpuFeatureNumStatus, 623 1, kNumWinSubVersions * kGpuFeatureNumStatus,
616 kNumWinSubVersions * kGpuFeatureNumStatus + 1, 624 kNumWinSubVersions * kGpuFeatureNumStatus + 1,
617 base::Histogram::kUmaTargetedHistogramFlag); 625 base::Histogram::kUmaTargetedHistogramFlag);
618 histogram_pointer->Add(GetGpuBlacklistHistogramValueWin(value)); 626 histogram_pointer->Add(GetGpuBlacklistHistogramValueWin(value));
619 #endif 627 #endif
620 } 628 }
621 } 629 }
622 630
623 } // namespace gpu_util; 631 } // 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