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 "base/json/json_reader.h" | 5 #include "base/json/json_reader.h" |
6 #include "gpu/config/gpu_control_list.h" | 6 #include "gpu/config/gpu_control_list.h" |
7 #include "gpu/config/gpu_info.h" | 7 #include "gpu/config/gpu_info.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 #define LONG_STRING_CONST(...) #__VA_ARGS__ | 10 #define LONG_STRING_CONST(...) #__VA_ARGS__ |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 ] | 391 ] |
392 } | 392 } |
393 ); | 393 ); |
394 ScopedEntry entry(GetEntryFromString(json)); | 394 ScopedEntry entry(GetEntryFromString(json)); |
395 EXPECT_TRUE(entry.get() != NULL); | 395 EXPECT_TRUE(entry.get() != NULL); |
396 | 396 |
397 GPUInfo gpu_info; | 397 GPUInfo gpu_info; |
398 gpu_info.gl_version = "OpenGL ES 3.0 V@66.0 AU@ (CL@)"; | 398 gpu_info.gl_version = "OpenGL ES 3.0 V@66.0 AU@ (CL@)"; |
399 EXPECT_TRUE(entry->Contains(GpuControlList::kOsAndroid, "4.4.2", gpu_info)); | 399 EXPECT_TRUE(entry->Contains(GpuControlList::kOsAndroid, "4.4.2", gpu_info)); |
400 | 400 |
| 401 gpu_info.gl_version = "OpenGL ES 3.0V@66.0 AU@ (CL@)"; |
| 402 EXPECT_TRUE(entry->Contains(GpuControlList::kOsAndroid, "4.4.2", gpu_info)); |
| 403 |
401 gpu_info.gl_version = "OpenGL ES 3.1 V@66.0 AU@ (CL@)"; | 404 gpu_info.gl_version = "OpenGL ES 3.1 V@66.0 AU@ (CL@)"; |
402 EXPECT_FALSE(entry->Contains(GpuControlList::kOsAndroid, "4.4.2", gpu_info)); | 405 EXPECT_FALSE(entry->Contains(GpuControlList::kOsAndroid, "4.4.2", gpu_info)); |
403 | 406 |
404 gpu_info.gl_version = "3.0 NVIDIA-8.24.11 310.90.9b01"; | 407 gpu_info.gl_version = "3.0 NVIDIA-8.24.11 310.90.9b01"; |
405 EXPECT_FALSE(entry->Contains(GpuControlList::kOsMacosx, "10.9", gpu_info)); | 408 EXPECT_FALSE(entry->Contains(GpuControlList::kOsMacosx, "10.9", gpu_info)); |
406 | 409 |
407 gpu_info.gl_version = "OpenGL ES 3.0 (ANGLE 1.2.0.2450)"; | 410 gpu_info.gl_version = "OpenGL ES 3.0 (ANGLE 1.2.0.2450)"; |
408 EXPECT_FALSE(entry->Contains(GpuControlList::kOsWin, "6.1", gpu_info)); | 411 EXPECT_FALSE(entry->Contains(GpuControlList::kOsWin, "6.1", gpu_info)); |
409 } | 412 } |
410 | 413 |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 ); | 1285 ); |
1283 // By default, secondary GPU is active. | 1286 // By default, secondary GPU is active. |
1284 EntryShouldNotApply(json); | 1287 EntryShouldNotApply(json); |
1285 | 1288 |
1286 ActivatePrimaryGPU(); | 1289 ActivatePrimaryGPU(); |
1287 EntryShouldApply(json); | 1290 EntryShouldApply(json); |
1288 } | 1291 } |
1289 | 1292 |
1290 } // namespace gpu | 1293 } // namespace gpu |
1291 | 1294 |
OLD | NEW |