OLD | NEW |
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 "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 bool IsForceGpuRasterizationEnabled() { | 263 bool IsForceGpuRasterizationEnabled() { |
264 const base::CommandLine& command_line = | 264 const base::CommandLine& command_line = |
265 *base::CommandLine::ForCurrentProcess(); | 265 *base::CommandLine::ForCurrentProcess(); |
266 | 266 |
267 if (!IsImplSidePaintingEnabled()) | 267 if (!IsImplSidePaintingEnabled()) |
268 return false; | 268 return false; |
269 | 269 |
270 return command_line.HasSwitch(switches::kForceGpuRasterization); | 270 return command_line.HasSwitch(switches::kForceGpuRasterization); |
271 } | 271 } |
272 | 272 |
| 273 bool UseSurfacesEnabled() { |
| 274 const base::CommandLine& command_line = |
| 275 *base::CommandLine::ForCurrentProcess(); |
| 276 |
| 277 return command_line.HasSwitch(switches::kUseSurfaces); |
| 278 } |
| 279 |
273 base::Value* GetFeatureStatus() { | 280 base::Value* GetFeatureStatus() { |
274 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); | 281 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); |
275 std::string gpu_access_blocked_reason; | 282 std::string gpu_access_blocked_reason; |
276 bool gpu_access_blocked = | 283 bool gpu_access_blocked = |
277 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); | 284 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); |
278 | 285 |
279 base::DictionaryValue* feature_status_dict = new base::DictionaryValue(); | 286 base::DictionaryValue* feature_status_dict = new base::DictionaryValue(); |
280 | 287 |
281 bool eof = false; | 288 bool eof = false; |
282 for (size_t i = 0; !eof; ++i) { | 289 for (size_t i = 0; !eof; ++i) { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 return problem_list; | 374 return problem_list; |
368 } | 375 } |
369 | 376 |
370 base::Value* GetDriverBugWorkarounds() { | 377 base::Value* GetDriverBugWorkarounds() { |
371 base::ListValue* workaround_list = new base::ListValue(); | 378 base::ListValue* workaround_list = new base::ListValue(); |
372 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | 379 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); |
373 return workaround_list; | 380 return workaround_list; |
374 } | 381 } |
375 | 382 |
376 } // namespace content | 383 } // namespace content |
OLD | NEW |