OLD | NEW |
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 Loading... |
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 Loading... |
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; |
OLD | NEW |