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

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

Issue 14520022: Turn on threaded compositing in OS X for continuous builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 #if defined(OS_MACOSX) 8 #if defined(OS_MACOSX)
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #endif 10 #endif
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Produce the same result on every run of this client. 105 // Produce the same result on every run of this client.
106 trial->UseOneTimeRandomization(); 106 trial->UseOneTimeRandomization();
107 107
108 base::FieldTrial::Probability force_compositing_mode_probability = 0; 108 base::FieldTrial::Probability force_compositing_mode_probability = 0;
109 base::FieldTrial::Probability threaded_compositing_probability = 0; 109 base::FieldTrial::Probability threaded_compositing_probability = 0;
110 110
111 // Note: Threaded compositing mode isn't feature complete on mac or linux yet: 111 // Note: Threaded compositing mode isn't feature complete on mac or linux yet:
112 // http://crbug.com/133602 for mac 112 // http://crbug.com/133602 for mac
113 // http://crbug.com/140866 for linux 113 // http://crbug.com/140866 for linux
114 114
115 #if defined(OS_WIN) 115 #if defined(OS_WIN) || defined(OS_MACOSX)
116 // Enable threaded compositing on Windows. 116 // Enable threaded compositing on Windows and Mac.
117 threaded_compositing_probability = kDivisor; 117 threaded_compositing_probability = kDivisor;
118 #elif defined(OS_MACOSX)
119 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
120 if (channel == chrome::VersionInfo::CHANNEL_CANARY ||
121 channel == chrome::VersionInfo::CHANNEL_DEV) {
122 // Enable force-compositing-mode on the Mac.
123 force_compositing_mode_probability = kDivisor;
124 }
125 #endif 118 #endif
126 119
127 int force_compositing_group = trial->AppendGroup( 120 int force_compositing_group = trial->AppendGroup(
128 content::kGpuCompositingFieldTrialForceCompositingEnabledName, 121 content::kGpuCompositingFieldTrialForceCompositingEnabledName,
129 force_compositing_mode_probability); 122 force_compositing_mode_probability);
130 int thread_group = trial->AppendGroup( 123 int thread_group = trial->AppendGroup(
131 content::kGpuCompositingFieldTrialThreadEnabledName, 124 content::kGpuCompositingFieldTrialThreadEnabledName,
132 threaded_compositing_probability); 125 threaded_compositing_probability);
133 126
134 bool force_compositing = (trial->group() == force_compositing_group); 127 bool force_compositing = (trial->group() == force_compositing_group);
135 bool thread = (trial->group() == thread_group); 128 bool thread = (trial->group() == thread_group);
136 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial", 129 UMA_HISTOGRAM_BOOLEAN("GPU.InForceCompositingModeFieldTrial",
137 force_compositing); 130 force_compositing);
138 UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread); 131 UMA_HISTOGRAM_BOOLEAN("GPU.InCompositorThreadFieldTrial", thread);
139 } 132 }
140 133
141 } // namespace gpu_util; 134 } // namespace gpu_util;
142 135
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