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/gpu_data_manager_impl.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl.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 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 void GpuDataManagerImpl::RequestCompleteGpuInfoIfNeeded() { | 103 void GpuDataManagerImpl::RequestCompleteGpuInfoIfNeeded() { |
104 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 104 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
105 | 105 |
106 if (complete_gpu_info_already_requested_ || complete_gpu_info_available_) | 106 if (complete_gpu_info_already_requested_ || complete_gpu_info_available_) |
107 return; | 107 return; |
108 complete_gpu_info_already_requested_ = true; | 108 complete_gpu_info_already_requested_ = true; |
109 | 109 |
110 GpuProcessHost::SendOnIO( | 110 GpuProcessHost::SendOnIO( |
111 0, | 111 GpuProcessHost::GPU_PROCESS_KIND_UNSANDBOXED, |
112 content::CAUSE_FOR_GPU_LAUNCH_GPUDATAMANAGER_REQUESTCOMPLETEGPUINFOIFNEEDE
D, | 112 content::CAUSE_FOR_GPU_LAUNCH_GPUDATAMANAGER_REQUESTCOMPLETEGPUINFOIFNEEDE
D, |
113 new GpuMsg_CollectGraphicsInfo()); | 113 new GpuMsg_CollectGraphicsInfo()); |
114 } | 114 } |
115 | 115 |
116 bool GpuDataManagerImpl::IsCompleteGPUInfoAvailable() const { | 116 bool GpuDataManagerImpl::IsCompleteGPUInfoAvailable() const { |
117 return complete_gpu_info_available_; | 117 return complete_gpu_info_available_; |
118 } | 118 } |
119 | 119 |
120 void GpuDataManagerImpl::UpdateGpuInfo(const content::GPUInfo& gpu_info) { | 120 void GpuDataManagerImpl::UpdateGpuInfo(const content::GPUInfo& gpu_info) { |
121 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 121 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 #if defined(OS_WIN) | 375 #if defined(OS_WIN) |
376 if (object->dx_diagnostics.values.size() == 0 && | 376 if (object->dx_diagnostics.values.size() == 0 && |
377 object->dx_diagnostics.children.size() == 0) { | 377 object->dx_diagnostics.children.size() == 0) { |
378 object->dx_diagnostics = other.dx_diagnostics; | 378 object->dx_diagnostics = other.dx_diagnostics; |
379 changed = true; | 379 changed = true; |
380 } | 380 } |
381 #endif | 381 #endif |
382 } | 382 } |
383 return changed; | 383 return changed; |
384 } | 384 } |
OLD | NEW |