| 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/chrome_gpu_util.h" | 5 #include "chrome/browser/chrome_gpu_util.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/version.h" | 10 #include "base/version.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 169 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 170 if (channel == chrome::VersionInfo::CHANNEL_CANARY || | 170 if (channel == chrome::VersionInfo::CHANNEL_CANARY || |
| 171 channel == chrome::VersionInfo::CHANNEL_DEV) { | 171 channel == chrome::VersionInfo::CHANNEL_DEV) { |
| 172 #if defined(OS_WIN) | 172 #if defined(OS_WIN) |
| 173 // Enable threaded compositing on Windows. | 173 // Enable threaded compositing on Windows. |
| 174 threaded_compositing_probability = kDivisor; | 174 threaded_compositing_probability = kDivisor; |
| 175 #elif defined(OS_MACOSX) | 175 #elif defined(OS_MACOSX) |
| 176 // Enable force-compositing-mode on the Mac. | 176 // Enable force-compositing-mode on the Mac. |
| 177 force_compositing_mode_probability = kDivisor; | 177 force_compositing_mode_probability = kDivisor; |
| 178 #endif | 178 #endif |
| 179 } else if (channel == chrome::VersionInfo::CHANNEL_UNKNOWN) { | |
| 180 // Continuous and local builds on windows and mac | |
| 181 // enable force-compositing-mode | |
| 182 #if defined(OS_WIN) || defined(OS_MACOSX) | |
| 183 force_compositing_mode_probability = kDivisor; | |
| 184 #endif | |
| 185 } | 179 } |
| 186 | 180 |
| 187 int force_compositing_group = trial->AppendGroup( | 181 int force_compositing_group = trial->AppendGroup( |
| 188 content::kGpuCompositingFieldTrialForceCompositingEnabledName, | 182 content::kGpuCompositingFieldTrialForceCompositingEnabledName, |
| 189 force_compositing_mode_probability); | 183 force_compositing_mode_probability); |
| 190 int thread_group = trial->AppendGroup( | 184 int thread_group = trial->AppendGroup( |
| 191 content::kGpuCompositingFieldTrialThreadEnabledName, | 185 content::kGpuCompositingFieldTrialThreadEnabledName, |
| 192 threaded_compositing_probability); | 186 threaded_compositing_probability); |
| 193 | 187 |
| 194 bool force_compositing = (trial->group() == force_compositing_group); | 188 bool force_compositing = (trial->group() == force_compositing_group); |
| 195 bool thread = (trial->group() == thread_group); | 189 bool thread = (trial->group() == thread_group); |
| 196 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial", | 190 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial", |
| 197 force_compositing); | 191 force_compositing); |
| 198 UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread); | 192 UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread); |
| 199 } | 193 } |
| 200 | 194 |
| 201 } // namespace gpu_util; | 195 } // namespace gpu_util; |
| 202 | 196 |
| OLD | NEW |