OLD | NEW |
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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 DCHECK(gl_vendor && gl_renderer && gl_version); | 543 DCHECK(gl_vendor && gl_renderer && gl_version); |
544 | 544 |
545 *gl_vendor = gpu_info_.gl_vendor; | 545 *gl_vendor = gpu_info_.gl_vendor; |
546 *gl_renderer = gpu_info_.gl_renderer; | 546 *gl_renderer = gpu_info_.gl_renderer; |
547 *gl_version = gpu_info_.gl_version_string; | 547 *gl_version = gpu_info_.gl_version_string; |
548 } | 548 } |
549 | 549 |
550 void GpuDataManagerImplPrivate::Initialize() { | 550 void GpuDataManagerImplPrivate::Initialize() { |
551 TRACE_EVENT0("startup", "GpuDataManagerImpl::Initialize"); | 551 TRACE_EVENT0("startup", "GpuDataManagerImpl::Initialize"); |
552 if (finalized_) { | 552 if (finalized_) { |
553 DLOG(INFO) << "GpuDataManagerImpl marked as finalized; skipping Initialize"; | 553 DVLOG(0) << "GpuDataManagerImpl marked as finalized; skipping Initialize"; |
554 return; | 554 return; |
555 } | 555 } |
556 | 556 |
557 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 557 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
558 if (command_line->HasSwitch(switches::kSkipGpuDataLoading)) | 558 if (command_line->HasSwitch(switches::kSkipGpuDataLoading)) |
559 return; | 559 return; |
560 | 560 |
561 gpu::GPUInfo gpu_info; | 561 gpu::GPUInfo gpu_info; |
562 if (command_line->GetSwitchValueASCII( | 562 if (command_line->GetSwitchValueASCII( |
563 switches::kUseGL) == gfx::kGLImplementationOSMesaName) { | 563 switches::kUseGL) == gfx::kGLImplementationOSMesaName) { |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 | 1205 |
1206 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1206 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
1207 gpu_process_accessible_ = false; | 1207 gpu_process_accessible_ = false; |
1208 gpu_info_.finalized = true; | 1208 gpu_info_.finalized = true; |
1209 complete_gpu_info_already_requested_ = true; | 1209 complete_gpu_info_already_requested_ = true; |
1210 // Some observers might be waiting. | 1210 // Some observers might be waiting. |
1211 NotifyGpuInfoUpdate(); | 1211 NotifyGpuInfoUpdate(); |
1212 } | 1212 } |
1213 | 1213 |
1214 } // namespace content | 1214 } // namespace content |
OLD | NEW |