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

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

Issue 10824044: Force the current card to be blacklisted if all of its features are disabled. (Closed) Base URL: svn://svn.chromium.org/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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 return false; 249 return false;
250 } 250 }
251 251
252 // static 252 // static
253 GpuProcessHost* GpuProcessHost::Get(GpuProcessKind kind, 253 GpuProcessHost* GpuProcessHost::Get(GpuProcessKind kind,
254 content::CauseForGpuLaunch cause) { 254 content::CauseForGpuLaunch cause) {
255 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 255 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
256 256
257 // Don't grant further access to GPU if it is not allowed. 257 // Don't grant further access to GPU if it is not allowed.
258 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); 258 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
259 if (gpu_data_manager != NULL && !gpu_data_manager->GpuAccessAllowed()) 259 if (gpu_data_manager != NULL &&
260 gpu_data_manager->GetGpuFeatureType() == content::GPU_FEATURE_TYPE_ALL)
Zhenyao Mo 2012/07/30 17:03:19 I think you should also keep the original !GpuAcce
Alexander Potapenko 2012/07/31 09:17:55 Done.
260 return NULL; 261 return NULL;
261 262
262 if (g_gpu_process_hosts[kind] && HostIsValid(g_gpu_process_hosts[kind])) 263 if (g_gpu_process_hosts[kind] && HostIsValid(g_gpu_process_hosts[kind]))
263 return g_gpu_process_hosts[kind]; 264 return g_gpu_process_hosts[kind];
264 265
265 if (cause == content::CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH) 266 if (cause == content::CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH)
266 return NULL; 267 return NULL;
267 268
268 int host_id; 269 int host_id;
269 host_id = ++g_last_host_id; 270 host_id = ++g_last_host_id;
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 const IPC::ChannelHandle& channel_handle, 861 const IPC::ChannelHandle& channel_handle,
861 base::ProcessHandle renderer_process_for_gpu, 862 base::ProcessHandle renderer_process_for_gpu,
862 const content::GPUInfo& gpu_info) { 863 const content::GPUInfo& gpu_info) {
863 callback.Run(channel_handle, gpu_info); 864 callback.Run(channel_handle, gpu_info);
864 } 865 }
865 866
866 void GpuProcessHost::CreateCommandBufferError( 867 void GpuProcessHost::CreateCommandBufferError(
867 const CreateCommandBufferCallback& callback, int32 route_id) { 868 const CreateCommandBufferCallback& callback, int32 route_id) {
868 callback.Run(route_id); 869 callback.Run(route_id);
869 } 870 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698