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 |
179 } | 185 } |
180 | 186 |
181 int force_compositing_group = trial->AppendGroup( | 187 int force_compositing_group = trial->AppendGroup( |
182 content::kGpuCompositingFieldTrialForceCompositingEnabledName, | 188 content::kGpuCompositingFieldTrialForceCompositingEnabledName, |
183 force_compositing_mode_probability); | 189 force_compositing_mode_probability); |
184 int thread_group = trial->AppendGroup( | 190 int thread_group = trial->AppendGroup( |
185 content::kGpuCompositingFieldTrialThreadEnabledName, | 191 content::kGpuCompositingFieldTrialThreadEnabledName, |
186 threaded_compositing_probability); | 192 threaded_compositing_probability); |
187 | 193 |
188 bool force_compositing = (trial->group() == force_compositing_group); | 194 bool force_compositing = (trial->group() == force_compositing_group); |
189 bool thread = (trial->group() == thread_group); | 195 bool thread = (trial->group() == thread_group); |
190 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial", | 196 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial", |
191 force_compositing); | 197 force_compositing); |
192 UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread); | 198 UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread); |
193 } | 199 } |
194 | 200 |
195 } // namespace gpu_util; | 201 } // namespace gpu_util; |
196 | 202 |
OLD | NEW |