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

Side by Side Diff: content/browser/gpu/compositor_util.cc

Issue 259843006: Revert of cc: Enable impl-side painting by default on all platforms where threaded compositing is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 "content/browser/gpu/compositor_util.h" 5 #include "content/browser/gpu/compositor_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 bool IsImplSidePaintingEnabled() { 185 bool IsImplSidePaintingEnabled() {
186 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 186 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
187 187
188 if (command_line.HasSwitch(switches::kDisableImplSidePainting)) 188 if (command_line.HasSwitch(switches::kDisableImplSidePainting))
189 return false; 189 return false;
190 else if (command_line.HasSwitch(switches::kEnableImplSidePainting)) 190 else if (command_line.HasSwitch(switches::kEnableImplSidePainting))
191 return true; 191 return true;
192 192
193 return IsThreadedCompositingEnabled(); 193 #if defined(OS_ANDROID)
194 return true;
195 #else
196 return false;
197 #endif
194 } 198 }
195 199
196 bool IsGpuRasterizationEnabled() { 200 bool IsGpuRasterizationEnabled() {
197 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 201 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
198 202
199 if (!IsImplSidePaintingEnabled()) 203 if (!IsImplSidePaintingEnabled())
200 return false; 204 return false;
201 205
202 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) 206 if (command_line.HasSwitch(switches::kDisableGpuRasterization))
203 return false; 207 return false;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 return problem_list; 320 return problem_list;
317 } 321 }
318 322
319 base::Value* GetDriverBugWorkarounds() { 323 base::Value* GetDriverBugWorkarounds() {
320 base::ListValue* workaround_list = new base::ListValue(); 324 base::ListValue* workaround_list = new base::ListValue();
321 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); 325 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list);
322 return workaround_list; 326 return workaround_list;
323 } 327 }
324 328
325 } // namespace content 329 } // namespace content
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