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

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

Issue 26853004: Enable delegated rendering on Aura Windows and Linux (not Chrome OS) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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
115 // Flags override. 121 // Flags override.
116 enabled |= command_line.HasSwitch(switches::kEnableDelegatedRenderer); 122 enabled |= command_line.HasSwitch(switches::kEnableDelegatedRenderer);
117 enabled &= !command_line.HasSwitch(switches::kDisableDelegatedRenderer); 123 enabled &= !command_line.HasSwitch(switches::kDisableDelegatedRenderer);
118 124
119 // Needs compositing, and thread. 125 // Needs compositing, and thread.
120 if (enabled && 126 if (enabled &&
121 (!IsForceCompositingModeEnabled() || !IsThreadedCompositingEnabled())) { 127 (!IsForceCompositingModeEnabled() || !IsThreadedCompositingEnabled())) {
122 enabled = false; 128 enabled = false;
123 LOG(ERROR) << "Disabling delegated-rendering because it needs " 129 LOG(ERROR) << "Disabling delegated-rendering because it needs "
124 << "force-compositing-mode and threaded-compositing."; 130 << "force-compositing-mode and threaded-compositing.";
125 } 131 }
126 132
127 return enabled; 133 return enabled;
128 } 134 }
129 135
130 bool IsDeadlineSchedulingEnabled() { 136 bool IsDeadlineSchedulingEnabled() {
131 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 137 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
132 138
133 // Default to disabled. 139 // Default to disabled.
134 bool enabled = false; 140 bool enabled = false;
135 141
136 // Flags override. 142 // Flags override.
137 enabled |= command_line.HasSwitch(switches::kEnableDeadlineScheduling); 143 enabled |= command_line.HasSwitch(switches::kEnableDeadlineScheduling);
138 enabled &= !command_line.HasSwitch(switches::kDisableDeadlineScheduling); 144 enabled &= !command_line.HasSwitch(switches::kDisableDeadlineScheduling);
139 145
140 return enabled; 146 return enabled;
141 } 147 }
142 148
143 } // namespace content 149 } // 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