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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 gpu::GpuSwitchingOption option = | 1015 gpu::GpuSwitchingOption option = |
1016 gpu::StringToGpuSwitchingOption(option_string); | 1016 gpu::StringToGpuSwitchingOption(option_string); |
1017 if (option != gpu::GPU_SWITCHING_OPTION_UNKNOWN) | 1017 if (option != gpu::GPU_SWITCHING_OPTION_UNKNOWN) |
1018 gpu_switching_ = option; | 1018 gpu_switching_ = option; |
1019 } | 1019 } |
1020 | 1020 |
1021 #if defined(OS_MACOSX) | 1021 #if defined(OS_MACOSX) |
1022 CGGetActiveDisplayList (0, NULL, &display_count_); | 1022 CGGetActiveDisplayList (0, NULL, &display_count_); |
1023 CGDisplayRegisterReconfigurationCallback(DisplayReconfigCallback, owner_); | 1023 CGDisplayRegisterReconfigurationCallback(DisplayReconfigCallback, owner_); |
1024 #endif // OS_MACOSX | 1024 #endif // OS_MACOSX |
| 1025 |
| 1026 // For testing only. |
| 1027 if (command_line->HasSwitch( |
| 1028 switches::kDisableDomainBlockingFor3DAPIsForTesting)) { |
| 1029 domain_blocking_enabled_ = false; |
| 1030 } |
1025 } | 1031 } |
1026 | 1032 |
1027 GpuDataManagerImplPrivate::~GpuDataManagerImplPrivate() { | 1033 GpuDataManagerImplPrivate::~GpuDataManagerImplPrivate() { |
1028 #if defined(OS_MACOSX) | 1034 #if defined(OS_MACOSX) |
1029 CGDisplayRemoveReconfigurationCallback(DisplayReconfigCallback, owner_); | 1035 CGDisplayRemoveReconfigurationCallback(DisplayReconfigCallback, owner_); |
1030 #endif | 1036 #endif |
1031 } | 1037 } |
1032 | 1038 |
1033 void GpuDataManagerImplPrivate::InitializeImpl( | 1039 void GpuDataManagerImplPrivate::InitializeImpl( |
1034 const std::string& gpu_blacklist_json, | 1040 const std::string& gpu_blacklist_json, |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 | 1263 |
1258 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1264 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
1259 gpu_process_accessible_ = false; | 1265 gpu_process_accessible_ = false; |
1260 gpu_info_.finalized = true; | 1266 gpu_info_.finalized = true; |
1261 complete_gpu_info_already_requested_ = true; | 1267 complete_gpu_info_already_requested_ = true; |
1262 // Some observers might be waiting. | 1268 // Some observers might be waiting. |
1263 NotifyGpuInfoUpdate(); | 1269 NotifyGpuInfoUpdate(); |
1264 } | 1270 } |
1265 | 1271 |
1266 } // namespace content | 1272 } // namespace content |
OLD | NEW |