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 | |
132 bool GpuDataManagerImpl::CanUseGpuBrowserCompositor() const { | 126 bool GpuDataManagerImpl::CanUseGpuBrowserCompositor() const { |
133 base::AutoLock auto_lock(lock_); | 127 base::AutoLock auto_lock(lock_); |
134 return private_->CanUseGpuBrowserCompositor(); | 128 return private_->CanUseGpuBrowserCompositor(); |
135 } | 129 } |
136 | 130 |
137 void GpuDataManagerImpl::GetDisabledExtensions( | 131 void GpuDataManagerImpl::GetDisabledExtensions( |
138 std::string* disabled_extensions) const { | 132 std::string* disabled_extensions) const { |
139 base::AutoLock auto_lock(lock_); | 133 base::AutoLock auto_lock(lock_); |
140 private_->GetDisabledExtensions(disabled_extensions); | 134 private_->GetDisabledExtensions(disabled_extensions); |
141 } | 135 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 } | 269 } |
276 | 270 |
277 GpuDataManagerImpl::GpuDataManagerImpl() | 271 GpuDataManagerImpl::GpuDataManagerImpl() |
278 : private_(GpuDataManagerImplPrivate::Create(this)) { | 272 : private_(GpuDataManagerImplPrivate::Create(this)) { |
279 } | 273 } |
280 | 274 |
281 GpuDataManagerImpl::~GpuDataManagerImpl() { | 275 GpuDataManagerImpl::~GpuDataManagerImpl() { |
282 } | 276 } |
283 | 277 |
284 } // namespace content | 278 } // namespace content |
OLD | NEW |