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

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

Issue 12212128: Revert (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/chrome_gpu_util.h" 5 #include "chrome/browser/gpu/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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Produce the same result on every run of this client. 149 // Produce the same result on every run of this client.
150 trial->UseOneTimeRandomization(); 150 trial->UseOneTimeRandomization();
151 151
152 base::FieldTrial::Probability force_compositing_mode_probability = 0; 152 base::FieldTrial::Probability force_compositing_mode_probability = 0;
153 base::FieldTrial::Probability threaded_compositing_probability = 0; 153 base::FieldTrial::Probability threaded_compositing_probability = 0;
154 154
155 // Note: Threaded compositing mode isn't feature complete on mac or linux yet: 155 // Note: Threaded compositing mode isn't feature complete on mac or linux yet:
156 // http://crbug.com/133602 for mac 156 // http://crbug.com/133602 for mac
157 // http://crbug.com/140866 for linux 157 // http://crbug.com/140866 for linux
158 158
159 #if defined(OS_WIN) || defined(OS_MACOSX) 159 #if defined(OS_WIN)
160 // Enable threaded compositing on Windows. 160 // Enable threaded compositing on Windows.
161 threaded_compositing_probability = kDivisor; 161 threaded_compositing_probability = kDivisor;
162 #elif defined(OS_MACOSX)
163 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
164 if (channel == chrome::VersionInfo::CHANNEL_CANARY ||
165 channel == chrome::VersionInfo::CHANNEL_DEV) {
166 // Enable force-compositing-mode on the Mac.
167 force_compositing_mode_probability = kDivisor;
168 }
162 #endif 169 #endif
163 170
164 int force_compositing_group = trial->AppendGroup( 171 int force_compositing_group = trial->AppendGroup(
165 content::kGpuCompositingFieldTrialForceCompositingEnabledName, 172 content::kGpuCompositingFieldTrialForceCompositingEnabledName,
166 force_compositing_mode_probability); 173 force_compositing_mode_probability);
167 int thread_group = trial->AppendGroup( 174 int thread_group = trial->AppendGroup(
168 content::kGpuCompositingFieldTrialThreadEnabledName, 175 content::kGpuCompositingFieldTrialThreadEnabledName,
169 threaded_compositing_probability); 176 threaded_compositing_probability);
170 177
171 bool force_compositing = (trial->group() == force_compositing_group); 178 bool force_compositing = (trial->group() == force_compositing_group);
172 bool thread = (trial->group() == thread_group); 179 bool thread = (trial->group() == thread_group);
173 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial", 180 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial",
174 force_compositing); 181 force_compositing);
175 UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread); 182 UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread);
176 } 183 }
177 184
178 } // namespace gpu_util; 185 } // namespace gpu_util;
179 186
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