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

Side by Side Diff: content/test/gpu/gpu_test_config.cc

Issue 10389051: Change GPUInfo to handle multiple GPUs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/test/gpu/gpu_test_config.h" 5 #include "content/test/gpu/gpu_test_config.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sys_info.h" 8 #include "base/sys_info.h"
9 #include "content/gpu/gpu_info_collector.h" 9 #include "content/gpu/gpu_info_collector.h"
10 #include "content/public/common/gpu_info.h" 10 #include "content/public/common/gpu_info.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 GPUTestBotConfig::~GPUTestBotConfig() { 122 GPUTestBotConfig::~GPUTestBotConfig() {
123 } 123 }
124 124
125 void GPUTestBotConfig::AddGPUVendor(uint32 gpu_vendor) { 125 void GPUTestBotConfig::AddGPUVendor(uint32 gpu_vendor) {
126 DCHECK_EQ(0u, GPUTestConfig::gpu_vendor().size()); 126 DCHECK_EQ(0u, GPUTestConfig::gpu_vendor().size());
127 GPUTestConfig::AddGPUVendor(gpu_vendor); 127 GPUTestConfig::AddGPUVendor(gpu_vendor);
128 } 128 }
129 129
130 bool GPUTestBotConfig::SetGPUInfo(const content::GPUInfo& gpu_info) { 130 bool GPUTestBotConfig::SetGPUInfo(const content::GPUInfo& gpu_info) {
131 if (gpu_info.device_id == 0 || gpu_info.vendor_id == 0) 131 if (gpu_info.gpu.device_id == 0 || gpu_info.gpu.vendor_id == 0)
132 return false; 132 return false;
133 ClearGPUVendor(); 133 ClearGPUVendor();
134 AddGPUVendor(gpu_info.vendor_id); 134 AddGPUVendor(gpu_info.gpu.vendor_id);
135 set_gpu_device_id(gpu_info.device_id); 135 set_gpu_device_id(gpu_info.gpu.device_id);
136 return true; 136 return true;
137 } 137 }
138 138
139 bool GPUTestBotConfig::IsValid() const { 139 bool GPUTestBotConfig::IsValid() const {
140 switch (os()) { 140 switch (os()) {
141 case kOsWinXP: 141 case kOsWinXP:
142 case kOsWinVista: 142 case kOsWinVista:
143 case kOsWin7: 143 case kOsWin7:
144 case kOsMacLeopard: 144 case kOsMacLeopard:
145 case kOsMacSnowLeopard: 145 case kOsMacSnowLeopard:
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (os() == kOsUnknown) 202 if (os() == kOsUnknown)
203 rt = false; 203 rt = false;
204 #if defined(NDEBUG) 204 #if defined(NDEBUG)
205 set_build_type(kBuildTypeRelease); 205 set_build_type(kBuildTypeRelease);
206 #else 206 #else
207 set_build_type(kBuildTypeDebug); 207 set_build_type(kBuildTypeDebug);
208 #endif 208 #endif
209 return rt; 209 return rt;
210 } 210 }
211 211
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698