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

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

Issue 2087283003: Fixed running gpu process with kOverrideUseGLWithOSMesaForTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« 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) 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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 return; 520 return;
521 } 521 }
522 522
523 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 523 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
524 if (command_line->HasSwitch(switches::kSkipGpuDataLoading)) { 524 if (command_line->HasSwitch(switches::kSkipGpuDataLoading)) {
525 RunPostInitTasks(); 525 RunPostInitTasks();
526 return; 526 return;
527 } 527 }
528 528
529 gpu::GPUInfo gpu_info; 529 gpu::GPUInfo gpu_info;
530 if (command_line->GetSwitchValueASCII(switches::kUseGL) == 530 const bool force_osmesa =
531 gl::kGLImplementationOSMesaName) { 531 (command_line->GetSwitchValueASCII(switches::kUseGL) ==
532 gl::kGLImplementationOSMesaName) ||
533 (!command_line->HasSwitch(switches::kUseGL) &&
danakj 2016/06/23 20:01:13 Ideally we never have both kUseGL and kOverrideUse
534 command_line->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests));
535 if (force_osmesa) {
532 // If using the OSMesa GL implementation, use fake vendor and device ids to 536 // If using the OSMesa GL implementation, use fake vendor and device ids to
533 // make sure it never gets blacklisted. This is better than simply 537 // make sure it never gets blacklisted. This is better than simply
534 // cancelling GPUInfo gathering as it allows us to proceed with loading the 538 // cancelling GPUInfo gathering as it allows us to proceed with loading the
535 // blacklist below which may have non-device specific entries we want to 539 // blacklist below which may have non-device specific entries we want to
536 // apply anyways (e.g., OS version blacklisting). 540 // apply anyways (e.g., OS version blacklisting).
537 gpu_info.gpu.vendor_id = 0xffff; 541 gpu_info.gpu.vendor_id = 0xffff;
538 gpu_info.gpu.device_id = 0xffff; 542 gpu_info.gpu.device_id = 0xffff;
539 543
540 // Also declare the driver_vendor to be osmesa to be able to specify 544 // Also declare the driver_vendor to be osmesa to be able to specify
541 // exceptions based on driver_vendor==osmesa for some blacklist rules. 545 // exceptions based on driver_vendor==osmesa for some blacklist rules.
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1288 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1285 #if defined(OS_WIN) 1289 #if defined(OS_WIN)
1286 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1290 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1287 #endif 1291 #endif
1288 complete_gpu_info_already_requested_ = true; 1292 complete_gpu_info_already_requested_ = true;
1289 // Some observers might be waiting. 1293 // Some observers might be waiting.
1290 NotifyGpuInfoUpdate(); 1294 NotifyGpuInfoUpdate();
1291 } 1295 }
1292 1296
1293 } // namespace content 1297 } // namespace content
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