| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 command_line->AppendSwitch(switches::kDisableGLMultisampling); | 187 command_line->AppendSwitch(switches::kDisableGLMultisampling); |
| 188 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && | 188 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && |
| 189 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) | 189 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) |
| 190 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); | 190 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); |
| 191 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) && | 191 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) && |
| 192 !command_line->HasSwitch(switches::kDisableAccelerated2dCanvas)) | 192 !command_line->HasSwitch(switches::kDisableAccelerated2dCanvas)) |
| 193 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); | 193 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); |
| 194 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && | 194 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && |
| 195 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | 195 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
| 196 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); | 196 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
| 197 if (ShouldUseSoftwareRendering()) |
| 198 command_line->AppendSwitch(switches::kDisableFlashFullscreen3d); |
| 197 } | 199 } |
| 198 | 200 |
| 199 void GpuDataManagerImpl::AppendGpuCommandLine( | 201 void GpuDataManagerImpl::AppendGpuCommandLine( |
| 200 CommandLine* command_line) { | 202 CommandLine* command_line) { |
| 201 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 202 DCHECK(command_line); | 204 DCHECK(command_line); |
| 203 | 205 |
| 204 std::string use_gl = | 206 std::string use_gl = |
| 205 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); | 207 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); |
| 206 FilePath swiftshader_path = | 208 FilePath swiftshader_path = |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 363 |
| 362 void GpuDataManagerImpl::BlacklistCard() { | 364 void GpuDataManagerImpl::BlacklistCard() { |
| 363 card_blacklisted_ = true; | 365 card_blacklisted_ = true; |
| 364 | 366 |
| 365 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; | 367 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; |
| 366 | 368 |
| 367 EnableSoftwareRenderingIfNecessary(); | 369 EnableSoftwareRenderingIfNecessary(); |
| 368 NotifyGpuInfoUpdate(); | 370 NotifyGpuInfoUpdate(); |
| 369 } | 371 } |
| 370 | 372 |
| OLD | NEW |