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

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

Issue 27118002: Revert 228225 "Enable delegated rendering on Aura Windows and Li..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1669/src/
Patch Set: Created 7 years, 2 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 | content/browser/gpu/compositor_util_browsertest.cc » ('j') | 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/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/public/browser/gpu_data_manager.h" 10 #include "content/public/browser/gpu_data_manager.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return base::win::GetVersion() >= base::win::VERSION_VISTA; 105 return base::win::GetVersion() >= base::win::VERSION_VISTA;
106 #endif 106 #endif
107 107
108 return false; 108 return false;
109 } 109 }
110 110
111 bool IsDelegatedRendererEnabled() { 111 bool IsDelegatedRendererEnabled() {
112 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 112 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
113 bool enabled = false; 113 bool enabled = false;
114 114
115 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
116 // Enable on non-ChromeOS Aura. Chrome OS has driver issues on some platforms:
117 // https://code.google.com/p/chrome-os-partner/issues/detail?id=22688
118 enabled = true;
119 #endif
120
121 // Flags override. 115 // Flags override.
122 enabled |= command_line.HasSwitch(switches::kEnableDelegatedRenderer); 116 enabled |= command_line.HasSwitch(switches::kEnableDelegatedRenderer);
123 enabled &= !command_line.HasSwitch(switches::kDisableDelegatedRenderer); 117 enabled &= !command_line.HasSwitch(switches::kDisableDelegatedRenderer);
124 118
125 // Needs compositing, and thread. 119 // Needs compositing, and thread.
126 if (enabled && 120 if (enabled &&
127 (!IsForceCompositingModeEnabled() || !IsThreadedCompositingEnabled())) { 121 (!IsForceCompositingModeEnabled() || !IsThreadedCompositingEnabled())) {
128 enabled = false; 122 enabled = false;
129 LOG(ERROR) << "Disabling delegated-rendering because it needs " 123 LOG(ERROR) << "Disabling delegated-rendering because it needs "
130 << "force-compositing-mode and threaded-compositing."; 124 << "force-compositing-mode and threaded-compositing.";
131 } 125 }
132 126
133 return enabled; 127 return enabled;
134 } 128 }
135 129
136 bool IsDeadlineSchedulingEnabled() { 130 bool IsDeadlineSchedulingEnabled() {
137 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 131 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
138 132
139 // Default to disabled. 133 // Default to disabled.
140 bool enabled = false; 134 bool enabled = false;
141 135
142 // Flags override. 136 // Flags override.
143 enabled |= command_line.HasSwitch(switches::kEnableDeadlineScheduling); 137 enabled |= command_line.HasSwitch(switches::kEnableDeadlineScheduling);
144 enabled &= !command_line.HasSwitch(switches::kDisableDeadlineScheduling); 138 enabled &= !command_line.HasSwitch(switches::kDisableDeadlineScheduling);
145 139
146 return enabled; 140 return enabled;
147 } 141 }
148 142
149 } // namespace content 143 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/compositor_util_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698