Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 2878163002: Fix bug whereby OnGpuSwitched was never called (Closed)
Patch Set: Add missed file Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gpu/config/gpu_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 return; // This call contains no information about the display change 253 return; // This call contains no information about the display change
254 254
255 GpuDataManagerImpl* manager = 255 GpuDataManagerImpl* manager =
256 reinterpret_cast<GpuDataManagerImpl*>(gpu_data_manager); 256 reinterpret_cast<GpuDataManagerImpl*>(gpu_data_manager);
257 DCHECK(manager); 257 DCHECK(manager);
258 258
259 bool gpu_changed = false; 259 bool gpu_changed = false;
260 if (flags & kCGDisplayAddFlag) { 260 if (flags & kCGDisplayAddFlag) {
261 gpu::GPUInfo gpu_info; 261 gpu::GPUInfo gpu_info;
262 if (gpu::CollectBasicGraphicsInfo(&gpu_info) == gpu::kCollectInfoSuccess) { 262 if (gpu::CollectBasicGraphicsInfo(&gpu_info) == gpu::kCollectInfoSuccess) {
263 gpu_changed = manager->UpdateActiveGpu(gpu_info.gpu.vendor_id, 263 gpu_changed = manager->UpdateActiveGpu(gpu_info.active_gpu().vendor_id,
264 gpu_info.gpu.device_id); 264 gpu_info.active_gpu().device_id);
265 } 265 }
266 } 266 }
267 267
268 if (gpu_changed) 268 if (gpu_changed)
269 manager->HandleGpuSwitch(); 269 manager->HandleGpuSwitch();
270 } 270 }
271 #endif // OS_MACOSX 271 #endif // OS_MACOSX
272 272
273 // Block all domains' use of 3D APIs for this many milliseconds if 273 // Block all domains' use of 3D APIs for this many milliseconds if
274 // approaching a threshold where system stability might be compromised. 274 // approaching a threshold where system stability might be compromised.
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1402 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1403 #if defined(OS_WIN) 1403 #if defined(OS_WIN)
1404 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1404 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1405 #endif 1405 #endif
1406 complete_gpu_info_already_requested_ = true; 1406 complete_gpu_info_already_requested_ = true;
1407 // Some observers might be waiting. 1407 // Some observers might be waiting.
1408 NotifyGpuInfoUpdate(); 1408 NotifyGpuInfoUpdate();
1409 } 1409 }
1410 1410
1411 } // namespace content 1411 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/config/gpu_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698