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

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

Issue 2810593003: gpu: Some cleanups. (Closed)
Patch Set: . Created 3 years, 8 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
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 size_t GpuDataManagerImplPrivate::GetBlacklistedFeatureCount() const { 336 size_t GpuDataManagerImplPrivate::GetBlacklistedFeatureCount() const {
337 // SwiftShader blacklists all features 337 // SwiftShader blacklists all features
338 return use_swiftshader_ ? gpu::NUMBER_OF_GPU_FEATURE_TYPES 338 return use_swiftshader_ ? gpu::NUMBER_OF_GPU_FEATURE_TYPES
339 : blacklisted_features_.size(); 339 : blacklisted_features_.size();
340 } 340 }
341 341
342 gpu::GPUInfo GpuDataManagerImplPrivate::GetGPUInfo() const { 342 gpu::GPUInfo GpuDataManagerImplPrivate::GetGPUInfo() const {
343 return gpu_info_; 343 return gpu_info_;
344 } 344 }
345 345
346 void GpuDataManagerImplPrivate::GetGpuProcessHandles(
347 const GpuDataManager::GetGpuProcessHandlesCallback& callback) const {
348 GpuProcessHost::GetProcessHandles(callback);
349 }
350
351 bool GpuDataManagerImplPrivate::GpuAccessAllowed( 346 bool GpuDataManagerImplPrivate::GpuAccessAllowed(
352 std::string* reason) const { 347 std::string* reason) const {
353 if (use_swiftshader_) 348 if (use_swiftshader_)
354 return true; 349 return true;
355 350
356 if (!gpu_process_accessible_) { 351 if (!gpu_process_accessible_) {
357 if (reason) { 352 if (reason) {
358 *reason = "GPU process launch failed."; 353 *reason = "GPU process launch failed.";
359 } 354 }
360 return false; 355 return false;
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1385 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1391 #if defined(OS_WIN) 1386 #if defined(OS_WIN)
1392 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1387 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1393 #endif 1388 #endif
1394 complete_gpu_info_already_requested_ = true; 1389 complete_gpu_info_already_requested_ = true;
1395 // Some observers might be waiting. 1390 // Some observers might be waiting.
1396 NotifyGpuInfoUpdate(); 1391 NotifyGpuInfoUpdate();
1397 } 1392 }
1398 1393
1399 } // namespace content 1394 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698