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

Side by Side Diff: gpu/gles2_conform_support/gles2_conform_test.cc

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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 | « gpu/gles2_conform_support/egl/surface.h ('k') | gpu/gles2_conform_support/native/main.cc » ('j') | 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 "gpu/gles2_conform_support/gles2_conform_test.h" 5 #include "gpu/gles2_conform_support/gles2_conform_test.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include <string> 10 #include <string>
8 11
9 #include "base/at_exit.h" 12 #include "base/at_exit.h"
10 #include "base/base_paths.h" 13 #include "base/base_paths.h"
11 #include "base/command_line.h" 14 #include "base/command_line.h"
12 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
13 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
14 #include "base/logging.h" 17 #include "base/logging.h"
15 #if defined(OS_MACOSX) 18 #if defined(OS_MACOSX)
16 #include "base/mac/scoped_nsautorelease_pool.h" 19 #include "base/mac/scoped_nsautorelease_pool.h"
(...skipping 23 matching lines...) Expand all
40 return false; 43 return false;
41 } 44 }
42 gpu::GPUTestBotConfig bot_config; 45 gpu::GPUTestBotConfig bot_config;
43 if (!bot_config.LoadCurrentConfig(NULL)) { 46 if (!bot_config.LoadCurrentConfig(NULL)) {
44 LOG(ERROR) << "Fail to load bot configuration"; 47 LOG(ERROR) << "Fail to load bot configuration";
45 return false; 48 return false;
46 } 49 }
47 50
48 // Set the bot config api based on the OS and command line 51 // Set the bot config api based on the OS and command line
49 base::CommandLine* current_cmd_line = base::CommandLine::ForCurrentProcess(); 52 base::CommandLine* current_cmd_line = base::CommandLine::ForCurrentProcess();
50 int32 config_os = bot_config.os(); 53 int32_t config_os = bot_config.os();
51 if ((config_os & gpu::GPUTestConfig::kOsWin) != 0) { 54 if ((config_os & gpu::GPUTestConfig::kOsWin) != 0) {
52 std::string angle_renderer = 55 std::string angle_renderer =
53 current_cmd_line->HasSwitch("use-angle") 56 current_cmd_line->HasSwitch("use-angle")
54 ? current_cmd_line->GetSwitchValueASCII("use-angle") 57 ? current_cmd_line->GetSwitchValueASCII("use-angle")
55 : "d3d11"; 58 : "d3d11";
56 if (angle_renderer == "d3d11") { 59 if (angle_renderer == "d3d11") {
57 bot_config.set_api(gpu::GPUTestConfig::kAPID3D11); 60 bot_config.set_api(gpu::GPUTestConfig::kAPID3D11);
58 } else if (angle_renderer == "d3d9") { 61 } else if (angle_renderer == "d3d9") {
59 bot_config.set_api(gpu::GPUTestConfig::kAPID3D9); 62 bot_config.set_api(gpu::GPUTestConfig::kAPID3D9);
60 } else if (angle_renderer == "gl") { 63 } else if (angle_renderer == "gl") {
(...skipping 13 matching lines...) Expand all
74 bot_config.set_api(gpu::GPUTestConfig::kAPIUnknown); 77 bot_config.set_api(gpu::GPUTestConfig::kAPIUnknown);
75 } 78 }
76 79
77 if (!bot_config.IsValid()) { 80 if (!bot_config.IsValid()) {
78 LOG(ERROR) << "Invalid bot configuration"; 81 LOG(ERROR) << "Invalid bot configuration";
79 return false; 82 return false;
80 } 83 }
81 std::string path_string(path); 84 std::string path_string(path);
82 std::string test_name; 85 std::string test_name;
83 base::ReplaceChars(path_string, "\\/.", "_", &test_name); 86 base::ReplaceChars(path_string, "\\/.", "_", &test_name);
84 int32 expectation = 87 int32_t expectation =
85 test_expectations.GetTestExpectation(test_name, bot_config); 88 test_expectations.GetTestExpectation(test_name, bot_config);
86 if (expectation != gpu::GPUTestExpectationsParser::kGpuTestPass) { 89 if (expectation != gpu::GPUTestExpectationsParser::kGpuTestPass) {
87 LOG(WARNING) << "Test " << test_name << " is bypassed"; 90 LOG(WARNING) << "Test " << test_name << " is bypassed";
88 return true; 91 return true;
89 } 92 }
90 93
91 base::FilePath test_path; 94 base::FilePath test_path;
92 PathService::Get(base::DIR_EXE, &test_path); 95 PathService::Get(base::DIR_EXE, &test_path);
93 base::FilePath program(test_path.Append(FILE_PATH_LITERAL( 96 base::FilePath program(test_path.Append(FILE_PATH_LITERAL(
94 "gles2_conform_test_windowless"))); 97 "gles2_conform_test_windowless")));
95 98
(...skipping 21 matching lines...) Expand all
117 base::CommandLine::Init(argc, argv); 120 base::CommandLine::Init(argc, argv);
118 #if defined(OS_MACOSX) 121 #if defined(OS_MACOSX)
119 base::mac::ScopedNSAutoreleasePool pool; 122 base::mac::ScopedNSAutoreleasePool pool;
120 #endif 123 #endif
121 ::testing::InitGoogleTest(&argc, argv); 124 ::testing::InitGoogleTest(&argc, argv);
122 return RUN_ALL_TESTS(); 125 return RUN_ALL_TESTS();
123 } 126 }
124 127
125 128
126 129
OLDNEW
« no previous file with comments | « gpu/gles2_conform_support/egl/surface.h ('k') | gpu/gles2_conform_support/native/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698