| OLD | NEW |
| 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 #ifndef CONTENT_TEST_GPU_GPU_TEST_CONFIG_H_ | 5 #ifndef CONTENT_TEST_GPU_GPU_TEST_CONFIG_H_ |
| 6 #define CONTENT_TEST_GPU_GPU_TEST_CONFIG_H_ | 6 #define CONTENT_TEST_GPU_GPU_TEST_CONFIG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace gpu { |
| 15 struct GPUInfo; | 15 struct GPUInfo; |
| 16 } // namespace content | 16 } // namespace content |
| 17 | 17 |
| 18 class GPUTestConfig { | 18 class GPUTestConfig { |
| 19 public: | 19 public: |
| 20 enum OS { | 20 enum OS { |
| 21 kOsUnknown = 0, | 21 kOsUnknown = 0, |
| 22 kOsWinXP = 1 << 0, | 22 kOsWinXP = 1 << 0, |
| 23 kOsWinVista = 1 << 1, | 23 kOsWinVista = 1 << 1, |
| 24 kOsWin7 = 1 << 2, | 24 kOsWin7 = 1 << 2, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 class GPUTestBotConfig : public GPUTestConfig { | 90 class GPUTestBotConfig : public GPUTestConfig { |
| 91 public: | 91 public: |
| 92 GPUTestBotConfig() { } | 92 GPUTestBotConfig() { } |
| 93 virtual ~GPUTestBotConfig(); | 93 virtual ~GPUTestBotConfig(); |
| 94 | 94 |
| 95 // This should only be called when no gpu_vendor is added. | 95 // This should only be called when no gpu_vendor is added. |
| 96 virtual void AddGPUVendor(uint32 gpu_vendor) OVERRIDE; | 96 virtual void AddGPUVendor(uint32 gpu_vendor) OVERRIDE; |
| 97 | 97 |
| 98 // Return false if gpu_info does not have valid vendor_id and device_id. | 98 // Return false if gpu_info does not have valid vendor_id and device_id. |
| 99 bool SetGPUInfo(const content::GPUInfo& gpu_info); | 99 bool SetGPUInfo(const gpu::GPUInfo& gpu_info); |
| 100 | 100 |
| 101 // Check if the bot config is valid, i.e., if it is one valid test-bot | 101 // Check if the bot config is valid, i.e., if it is one valid test-bot |
| 102 // environment. For example, if a field is unknown, or if OS is not one | 102 // environment. For example, if a field is unknown, or if OS is not one |
| 103 // fully defined OS, then it's valid. | 103 // fully defined OS, then it's valid. |
| 104 virtual bool IsValid() const OVERRIDE; | 104 virtual bool IsValid() const OVERRIDE; |
| 105 | 105 |
| 106 // Check if a bot config matches a test config, i.e., the test config is a | 106 // Check if a bot config matches a test config, i.e., the test config is a |
| 107 // superset of the bot config. | 107 // superset of the bot config. |
| 108 bool Matches(const GPUTestConfig& config) const; | 108 bool Matches(const GPUTestConfig& config) const; |
| 109 bool Matches(const std::string& config_data) const; | 109 bool Matches(const std::string& config_data) const; |
| 110 | 110 |
| 111 // Setup the config with the current gpu testing environment. | 111 // Setup the config with the current gpu testing environment. |
| 112 // If gpu_info is NULL, collect GPUInfo first. | 112 // If gpu_info is NULL, collect GPUInfo first. |
| 113 bool LoadCurrentConfig(const content::GPUInfo* gpu_info); | 113 bool LoadCurrentConfig(const gpu::GPUInfo* gpu_info); |
| 114 | 114 |
| 115 // Check if this bot's config matches |config_data| or any of the |configs|. | 115 // Check if this bot's config matches |config_data| or any of the |configs|. |
| 116 static bool CurrentConfigMatches(const std::string& config_data); | 116 static bool CurrentConfigMatches(const std::string& config_data); |
| 117 static bool CurrentConfigMatches(const std::vector<std::string>& configs); | 117 static bool CurrentConfigMatches(const std::vector<std::string>& configs); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 #endif // CONTENT_TEST_GPU_GPU_TEST_CONFIG_H_ | 120 #endif // CONTENT_TEST_GPU_GPU_TEST_CONFIG_H_ |
| 121 | 121 |
| OLD | NEW |