Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl.cc

Issue 10830011: Disable WebGL on Android by default (but allow it to be enabled) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 observer_list_->RemoveObserver(observer); 157 observer_list_->RemoveObserver(observer);
158 } 158 }
159 159
160 void GpuDataManagerImpl::AppendRendererCommandLine( 160 void GpuDataManagerImpl::AppendRendererCommandLine(
161 CommandLine* command_line) { 161 CommandLine* command_line) {
162 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 162 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
163 DCHECK(command_line); 163 DCHECK(command_line);
164 164
165 uint32 flags = GetGpuFeatureType(); 165 uint32 flags = GetGpuFeatureType();
166 if ((flags & content::GPU_FEATURE_TYPE_WEBGL)) { 166 if ((flags & content::GPU_FEATURE_TYPE_WEBGL)) {
167 #if !defined(OS_ANDROID)
167 if (!command_line->HasSwitch(switches::kDisableExperimentalWebGL)) 168 if (!command_line->HasSwitch(switches::kDisableExperimentalWebGL))
168 command_line->AppendSwitch(switches::kDisableExperimentalWebGL); 169 command_line->AppendSwitch(switches::kDisableExperimentalWebGL);
170 #endif
169 if (!command_line->HasSwitch(switches::kDisablePepper3dForUntrustedUse)) 171 if (!command_line->HasSwitch(switches::kDisablePepper3dForUntrustedUse))
170 command_line->AppendSwitch(switches::kDisablePepper3dForUntrustedUse); 172 command_line->AppendSwitch(switches::kDisablePepper3dForUntrustedUse);
171 } 173 }
172 if ((flags & content::GPU_FEATURE_TYPE_MULTISAMPLING) && 174 if ((flags & content::GPU_FEATURE_TYPE_MULTISAMPLING) &&
173 !command_line->HasSwitch(switches::kDisableGLMultisampling)) 175 !command_line->HasSwitch(switches::kDisableGLMultisampling))
174 command_line->AppendSwitch(switches::kDisableGLMultisampling); 176 command_line->AppendSwitch(switches::kDisableGLMultisampling);
175 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && 177 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) &&
176 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) 178 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing))
177 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); 179 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
178 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) && 180 if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) &&
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 327
326 void GpuDataManagerImpl::BlacklistCard() { 328 void GpuDataManagerImpl::BlacklistCard() {
327 card_blacklisted_ = true; 329 card_blacklisted_ = true;
328 330
329 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; 331 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL;
330 332
331 EnableSoftwareRenderingIfNecessary(); 333 EnableSoftwareRenderingIfNecessary();
332 NotifyGpuInfoUpdate(); 334 NotifyGpuInfoUpdate();
333 } 335 }
334 336
OLDNEW
« no previous file with comments | « content/browser/android/content_startup_flags.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698