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

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

Issue 22198004: Always enable FCM on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update blacklist version Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_private.h" 5 #include "content/browser/gpu/gpu_data_manager_impl_private.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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 std::string* gl_version) { 549 std::string* gl_version) {
550 DCHECK(gl_vendor && gl_renderer && gl_version); 550 DCHECK(gl_vendor && gl_renderer && gl_version);
551 551
552 *gl_vendor = gpu_info_.gl_vendor; 552 *gl_vendor = gpu_info_.gl_vendor;
553 *gl_renderer = gpu_info_.gl_renderer; 553 *gl_renderer = gpu_info_.gl_renderer;
554 *gl_version = gpu_info_.gl_version_string; 554 *gl_version = gpu_info_.gl_version_string;
555 } 555 }
556 556
557 void GpuDataManagerImplPrivate::Initialize() { 557 void GpuDataManagerImplPrivate::Initialize() {
558 TRACE_EVENT0("startup", "GpuDataManagerImpl::Initialize"); 558 TRACE_EVENT0("startup", "GpuDataManagerImpl::Initialize");
559 CommandLine* command_line = CommandLine::ForCurrentProcess();
560 if (command_line->HasSwitch(switches::kSkipGpuDataLoading) &&
561 !command_line->HasSwitch(switches::kUseGpuInTests))
562 return;
563 559
564 gpu::GPUInfo gpu_info; 560 gpu::GPUInfo gpu_info;
565 { 561 {
Zhenyao Mo 2013/08/15 21:53:42 Here you should check if kUseGL is "osmesa" (I thi
gab 2013/08/16 16:37:08 Ok done, although I couldn't really find a good va
566 TRACE_EVENT0("startup", 562 TRACE_EVENT0("startup",
567 "GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo"); 563 "GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");
568 gpu::CollectBasicGraphicsInfo(&gpu_info); 564 gpu::CollectBasicGraphicsInfo(&gpu_info);
569 } 565 }
570 #if defined(ARCH_CPU_X86_FAMILY) 566 #if defined(ARCH_CPU_X86_FAMILY)
571 if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id) 567 if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id)
572 gpu_info.finalized = true; 568 gpu_info.finalized = true;
573 #endif 569 #endif
574 570
575 std::string gpu_blacklist_string; 571 std::string gpu_blacklist_string;
576 std::string gpu_switching_list_string; 572 std::string gpu_switching_list_string;
577 std::string gpu_driver_bug_list_string; 573 std::string gpu_driver_bug_list_string;
574 const CommandLine* command_line = CommandLine::ForCurrentProcess();
578 if (!command_line->HasSwitch(switches::kIgnoreGpuBlacklist) && 575 if (!command_line->HasSwitch(switches::kIgnoreGpuBlacklist) &&
579 !command_line->HasSwitch(switches::kUseGpuInTests)) { 576 !command_line->HasSwitch(switches::kUseGpuInTests)) {
580 gpu_blacklist_string = gpu::kSoftwareRenderingListJson; 577 gpu_blacklist_string = gpu::kSoftwareRenderingListJson;
581 gpu_switching_list_string = gpu::kGpuSwitchingListJson; 578 gpu_switching_list_string = gpu::kGpuSwitchingListJson;
582 } 579 }
583 if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { 580 if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
584 gpu_driver_bug_list_string = gpu::kGpuDriverBugListJson; 581 gpu_driver_bug_list_string = gpu::kGpuDriverBugListJson;
585 } 582 }
586 InitializeImpl(gpu_blacklist_string, 583 InitializeImpl(gpu_blacklist_string,
587 gpu_switching_list_string, 584 gpu_switching_list_string,
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { 1242 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() {
1246 gpu_process_accessible_ = false; 1243 gpu_process_accessible_ = false;
1247 gpu_info_.finalized = true; 1244 gpu_info_.finalized = true;
1248 complete_gpu_info_already_requested_ = true; 1245 complete_gpu_info_already_requested_ = true;
1249 // Some observers might be waiting. 1246 // Some observers might be waiting.
1250 NotifyGpuInfoUpdate(); 1247 NotifyGpuInfoUpdate();
1251 } 1248 }
1252 1249
1253 } // namespace content 1250 } // namespace content
1254 1251
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698