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 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 CommandLine* command_line) { | 246 CommandLine* command_line) { |
247 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 247 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
248 DCHECK(command_line); | 248 DCHECK(command_line); |
249 | 249 |
250 #if defined(OS_MACOSX) | 250 #if defined(OS_MACOSX) |
251 uint32 flags = GetGpuFeatureType(); | 251 uint32 flags = GetGpuFeatureType(); |
252 // TODO(jbauman): Add proper blacklist support for core animation plugins so | 252 // TODO(jbauman): Add proper blacklist support for core animation plugins so |
253 // special-casing this video card won't be necessary. See | 253 // special-casing this video card won't be necessary. See |
254 // http://crbug.com/134015 | 254 // http://crbug.com/134015 |
255 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) || | 255 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) || |
256 (gpu_info_.gpu.vendor_id == 0x8086 && // Intel | |
257 gpu_info_.gpu.device_id == 0x0166) || // HD 4000 | |
258 (gpu_info_.gpu.vendor_id == 0x10de && // NVidia | |
259 gpu_info_.gpu.device_id == 0x0fd5) || // GeForce GT 650M | |
260 CommandLine::ForCurrentProcess()->HasSwitch( | 256 CommandLine::ForCurrentProcess()->HasSwitch( |
261 switches::kDisableAcceleratedCompositing)) { | 257 switches::kDisableAcceleratedCompositing)) { |
262 if (!command_line->HasSwitch( | 258 if (!command_line->HasSwitch( |
263 switches::kDisableCoreAnimationPlugins)) | 259 switches::kDisableCoreAnimationPlugins)) |
264 command_line->AppendSwitch( | 260 command_line->AppendSwitch( |
265 switches::kDisableCoreAnimationPlugins); | 261 switches::kDisableCoreAnimationPlugins); |
266 } | 262 } |
267 #endif | 263 #endif |
268 } | 264 } |
269 | 265 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 323 |
328 void GpuDataManagerImpl::BlacklistCard() { | 324 void GpuDataManagerImpl::BlacklistCard() { |
329 card_blacklisted_ = true; | 325 card_blacklisted_ = true; |
330 | 326 |
331 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; | 327 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; |
332 | 328 |
333 EnableSoftwareRenderingIfNecessary(); | 329 EnableSoftwareRenderingIfNecessary(); |
334 NotifyGpuInfoUpdate(); | 330 NotifyGpuInfoUpdate(); |
335 } | 331 } |
336 | 332 |
OLD | NEW |