Chromium Code Reviews| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 } | 177 } |
| 178 if ((flags & content::GPU_FEATURE_TYPE_MULTISAMPLING) && | 178 if ((flags & content::GPU_FEATURE_TYPE_MULTISAMPLING) && |
| 179 !command_line->HasSwitch(switches::kDisableGLMultisampling)) | 179 !command_line->HasSwitch(switches::kDisableGLMultisampling)) |
| 180 command_line->AppendSwitch(switches::kDisableGLMultisampling); | 180 command_line->AppendSwitch(switches::kDisableGLMultisampling); |
| 181 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && | 181 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && |
| 182 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) | 182 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) |
| 183 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); | 183 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); |
| 184 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) && | 184 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) && |
| 185 !command_line->HasSwitch(switches::kDisableAccelerated2dCanvas)) | 185 !command_line->HasSwitch(switches::kDisableAccelerated2dCanvas)) |
| 186 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); | 186 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); |
| 187 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && | |
| 188 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | |
| 189 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); | |
|
Ami GONE FROM CHROMIUM
2012/08/17 00:19:17
What is this doing?
Zhenyao Mo
2012/08/17 00:25:09
This passes the switch to renderer process to disa
Ami GONE FROM CHROMIUM
2012/08/17 04:15:52
FWIW I was confused by the fact that GpuFeatureTyp
| |
| 187 } | 190 } |
| 188 | 191 |
| 189 void GpuDataManagerImpl::AppendGpuCommandLine( | 192 void GpuDataManagerImpl::AppendGpuCommandLine( |
| 190 CommandLine* command_line) { | 193 CommandLine* command_line) { |
| 191 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 192 DCHECK(command_line); | 195 DCHECK(command_line); |
| 193 | 196 |
| 194 std::string use_gl = | 197 std::string use_gl = |
| 195 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); | 198 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); |
| 196 FilePath swiftshader_path = | 199 FilePath swiftshader_path = |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 345 | 348 |
| 346 void GpuDataManagerImpl::BlacklistCard() { | 349 void GpuDataManagerImpl::BlacklistCard() { |
| 347 card_blacklisted_ = true; | 350 card_blacklisted_ = true; |
| 348 | 351 |
| 349 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; | 352 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; |
| 350 | 353 |
| 351 EnableSoftwareRenderingIfNecessary(); | 354 EnableSoftwareRenderingIfNecessary(); |
| 352 NotifyGpuInfoUpdate(); | 355 NotifyGpuInfoUpdate(); |
| 353 } | 356 } |
| 354 | 357 |
| OLD | NEW |