| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 prefs->accelerated_compositing_for_plugins_enabled = true; | 798 prefs->accelerated_compositing_for_plugins_enabled = true; |
| 799 prefs->accelerated_compositing_for_video_enabled = true; | 799 prefs->accelerated_compositing_for_video_enabled = true; |
| 800 } | 800 } |
| 801 | 801 |
| 802 #if defined(USE_AURA) | 802 #if defined(USE_AURA) |
| 803 if (!CanUseGpuBrowserCompositor()) { | 803 if (!CanUseGpuBrowserCompositor()) { |
| 804 prefs->accelerated_2d_canvas_enabled = false; | 804 prefs->accelerated_2d_canvas_enabled = false; |
| 805 prefs->pepper_3d_enabled = false; | 805 prefs->pepper_3d_enabled = false; |
| 806 } | 806 } |
| 807 #endif | 807 #endif |
| 808 |
| 809 if (!IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && |
| 810 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 811 switches::kDisableAcceleratedVideoDecode)) { |
| 812 prefs->accelerated_video_decode_enabled = true; |
| 813 } |
| 808 } | 814 } |
| 809 | 815 |
| 810 void GpuDataManagerImplPrivate::DisableHardwareAcceleration() { | 816 void GpuDataManagerImplPrivate::DisableHardwareAcceleration() { |
| 811 card_blacklisted_ = true; | 817 card_blacklisted_ = true; |
| 812 | 818 |
| 813 for (int i = 0; i < gpu::NUMBER_OF_GPU_FEATURE_TYPES; ++i) | 819 for (int i = 0; i < gpu::NUMBER_OF_GPU_FEATURE_TYPES; ++i) |
| 814 blacklisted_features_.insert(i); | 820 blacklisted_features_.insert(i); |
| 815 | 821 |
| 816 EnableSwiftShaderIfNecessary(); | 822 EnableSwiftShaderIfNecessary(); |
| 817 NotifyGpuInfoUpdate(); | 823 NotifyGpuInfoUpdate(); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 | 1174 |
| 1169 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1175 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
| 1170 gpu_process_accessible_ = false; | 1176 gpu_process_accessible_ = false; |
| 1171 gpu_info_.finalized = true; | 1177 gpu_info_.finalized = true; |
| 1172 complete_gpu_info_already_requested_ = true; | 1178 complete_gpu_info_already_requested_ = true; |
| 1173 // Some observers might be waiting. | 1179 // Some observers might be waiting. |
| 1174 NotifyGpuInfoUpdate(); | 1180 NotifyGpuInfoUpdate(); |
| 1175 } | 1181 } |
| 1176 | 1182 |
| 1177 } // namespace content | 1183 } // namespace content |
| OLD | NEW |