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

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

Issue 11337014: Enable force-compositing-mode on developer and continuous builds. This should start running the (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
« 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/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
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
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