| 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.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 6 | 6 |
| 7 #include "content/browser/gpu/gpu_data_manager_impl_private.h" | 7 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 8 #include "gpu/ipc/common/memory_stats.h" | 8 #include "gpu/ipc/common/memory_stats.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 std::string* gl_version) { | 116 std::string* gl_version) { |
| 117 base::AutoLock auto_lock(lock_); | 117 base::AutoLock auto_lock(lock_); |
| 118 private_->GetGLStrings(gl_vendor, gl_renderer, gl_version); | 118 private_->GetGLStrings(gl_vendor, gl_renderer, gl_version); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void GpuDataManagerImpl::DisableHardwareAcceleration() { | 121 void GpuDataManagerImpl::DisableHardwareAcceleration() { |
| 122 base::AutoLock auto_lock(lock_); | 122 base::AutoLock auto_lock(lock_); |
| 123 private_->DisableHardwareAcceleration(); | 123 private_->DisableHardwareAcceleration(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool GpuDataManagerImpl::HardwareAccelerationEnabled() const { |
| 127 base::AutoLock auto_lock(lock_); |
| 128 return !private_->ShouldUseSwiftShader() && |
| 129 private_->GpuAccessAllowed(nullptr); |
| 130 } |
| 131 |
| 126 bool GpuDataManagerImpl::CanUseGpuBrowserCompositor() const { | 132 bool GpuDataManagerImpl::CanUseGpuBrowserCompositor() const { |
| 127 base::AutoLock auto_lock(lock_); | 133 base::AutoLock auto_lock(lock_); |
| 128 return private_->CanUseGpuBrowserCompositor(); | 134 return private_->CanUseGpuBrowserCompositor(); |
| 129 } | 135 } |
| 130 | 136 |
| 131 void GpuDataManagerImpl::GetDisabledExtensions( | 137 void GpuDataManagerImpl::GetDisabledExtensions( |
| 132 std::string* disabled_extensions) const { | 138 std::string* disabled_extensions) const { |
| 133 base::AutoLock auto_lock(lock_); | 139 base::AutoLock auto_lock(lock_); |
| 134 private_->GetDisabledExtensions(disabled_extensions); | 140 private_->GetDisabledExtensions(disabled_extensions); |
| 135 } | 141 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 275 } |
| 270 | 276 |
| 271 GpuDataManagerImpl::GpuDataManagerImpl() | 277 GpuDataManagerImpl::GpuDataManagerImpl() |
| 272 : private_(GpuDataManagerImplPrivate::Create(this)) { | 278 : private_(GpuDataManagerImplPrivate::Create(this)) { |
| 273 } | 279 } |
| 274 | 280 |
| 275 GpuDataManagerImpl::~GpuDataManagerImpl() { | 281 GpuDataManagerImpl::~GpuDataManagerImpl() { |
| 276 } | 282 } |
| 277 | 283 |
| 278 } // namespace content | 284 } // namespace content |
| OLD | NEW |