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

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

Issue 10832356: Use GPU blacklist to control accelerated video decode. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 | Annotate | Revision Log
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
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
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
OLDNEW
« no previous file with comments | « chrome/browser/resources/software_rendering_list.json ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698