| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gpu_data_manager.h" | 5 #include "content/browser/gpu/gpu_data_manager.h" |
| 6 | 6 |
| 7 #if defined(OS_MACOSX) | 7 #if defined(OS_MACOSX) |
| 8 #include <CoreGraphics/CGDisplayConfiguration.h> | 8 #include <CoreGraphics/CGDisplayConfiguration.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
| 14 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
| 15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "base/version.h" | 17 #include "base/version.h" |
| 18 #include "content/browser/gpu/gpu_blacklist.h" | 18 #include "content/browser/gpu/gpu_blacklist.h" |
| 19 #include "content/browser/gpu/gpu_process_host.h" | 19 #include "content/browser/gpu/gpu_process_host.h" |
| 20 #include "content/common/gpu/gpu_messages.h" | 20 #include "content/common/gpu/gpu_messages.h" |
| 21 #include "content/gpu/gpu_info_collector.h" | 21 #include "content/gpu/gpu_info_collector.h" |
| 22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 23 #include "content/public/common/content_client.h" | 23 #include "content/public/common/content_client.h" |
| 24 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
| 25 #include "ui/gfx/gl/gl_implementation.h" | 25 #include "ui/gfx/gl/gl_implementation.h" |
| 26 #include "ui/gfx/gl/gl_switches.h" | 26 #include "ui/gfx/gl/gl_switches.h" |
| 27 #include "webkit/plugins/plugin_switches.h" | 27 #include "webkit/plugins/plugin_switches.h" |
| 28 | 28 |
| 29 using content::BrowserThread; |
| 30 |
| 29 namespace { | 31 namespace { |
| 30 | 32 |
| 31 enum GpuFeatureStatus { | 33 enum GpuFeatureStatus { |
| 32 kGpuFeatureEnabled = 0, | 34 kGpuFeatureEnabled = 0, |
| 33 kGpuFeatureBlacklisted = 1, | 35 kGpuFeatureBlacklisted = 1, |
| 34 kGpuFeatureDisabled = 2, // disabled by user but not blacklisted | 36 kGpuFeatureDisabled = 2, // disabled by user but not blacklisted |
| 35 kGpuFeatureNumStatus | 37 kGpuFeatureNumStatus |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 struct GpuFeatureInfo { | 40 struct GpuFeatureInfo { |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 bool GpuDataManager::supportsAccelerated2dCanvas() const { | 765 bool GpuDataManager::supportsAccelerated2dCanvas() const { |
| 764 if (gpu_info_.can_lose_context) | 766 if (gpu_info_.can_lose_context) |
| 765 return false; | 767 return false; |
| 766 #if defined(USE_SKIA) | 768 #if defined(USE_SKIA) |
| 767 return true; | 769 return true; |
| 768 #else | 770 #else |
| 769 return false; | 771 return false; |
| 770 #endif | 772 #endif |
| 771 } | 773 } |
| 772 | 774 |
| OLD | NEW |