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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 269 } |
270 if (card_blacklisted_ || | 270 if (card_blacklisted_ || |
271 command_line->HasSwitch(switches::kBlacklistWebGL)) { | 271 command_line->HasSwitch(switches::kBlacklistWebGL)) { |
272 flags |= content::GPU_FEATURE_TYPE_WEBGL; | 272 flags |= content::GPU_FEATURE_TYPE_WEBGL; |
273 } | 273 } |
274 gpu_feature_type_ = static_cast<GpuFeatureType>(flags); | 274 gpu_feature_type_ = static_cast<GpuFeatureType>(flags); |
275 | 275 |
276 EnableSoftwareRenderingIfNecessary(); | 276 EnableSoftwareRenderingIfNecessary(); |
277 } | 277 } |
278 | 278 |
279 void GpuDataManagerImpl::RegisterSwiftShaderPath(FilePath path) { | 279 void GpuDataManagerImpl::RegisterSwiftShaderPath(const FilePath& path) { |
280 swiftshader_path_ = path; | 280 swiftshader_path_ = path; |
281 EnableSoftwareRenderingIfNecessary(); | 281 EnableSoftwareRenderingIfNecessary(); |
282 } | 282 } |
283 | 283 |
284 const base::ListValue& GpuDataManagerImpl::GetLogMessages() const { | 284 const base::ListValue& GpuDataManagerImpl::GetLogMessages() const { |
285 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 285 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
286 return log_messages_; | 286 return log_messages_; |
287 } | 287 } |
288 | 288 |
289 void GpuDataManagerImpl::EnableSoftwareRenderingIfNecessary() { | 289 void GpuDataManagerImpl::EnableSoftwareRenderingIfNecessary() { |
(...skipping 85 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 |