Commit 0ef5c746 by Corentin Wallez

Revert "gpu_test_expectations: Fix a -Wheader-hygiene"

This patch causes a compile failure, probably because some symbols had been declared in the root namespace and should have been moved to base. (but weren't compiled under Linux) BUG= This reverts commit f41e04db. Change-Id: Ia2292bf9dcbf429f47c8c8632356574a91ff0a1d Reviewed-on: https://chromium-review.googlesource.com/295110Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 1c207ae9
......@@ -5,7 +5,7 @@ will allow us to merge Chromium changes easily in our ```gpu_test_expectations``
In order to make a change to this directory, do the following:
* copy the directory somewhere like in ```gpu_test_expectations_reverted```
* in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R < angle-mods.patch```
* in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R angle-mods.patch```
* do your changes in ```gpu_test_expectations```
* delete angle-mods.path in both directories
* run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch```
......
diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectations/angle_config.h
--- gpu_test_expectations_reverted/angle_config.h 1969-12-31 19:00:00.000000000 -0500
+++ gpu_test_expectations/angle_config.h 2015-08-20 17:15:56.397807170 -0400
@@ -0,0 +1,55 @@
diff --git a/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md b/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md
new file mode 100644
index 0000000..4b5f2ed
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md
@@ -0,0 +1,22 @@
+Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config``
+directory, we want to keep a patch of the changes added to make it compile with ANGLE. This
+will allow us to merge Chromium changes easily in our ```gpu_test_expectations```.
+
+In order to make a change to this directory, do the following:
+
+ * copy the directory somewhere like in ```gpu_test_expectations_reverted```
+ * in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R angle-mods.patch```
+ * do your changes in ```gpu_test_expectations```
+ * delete angle-mods.path in both directories
+ * run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch```
+ * copy ```angle-mods.patch``` in ```gpu_test_expectations```
+
+How to update from Chromium:
+
+ * ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit```
+ * Copy over Chromium files, ```git add . -u```, ```git commit```
+ * ```git revert HEAD~2```
+ * ```rm angle-mods.patch```
+ * ```git diff HEAD~1 (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend```
+ * ```git rebase -i``` to squash the three patches into one.
+
diff --git a/src/tests/third_party/gpu_test_expectations/angle_config.h b/src/tests/third_party/gpu_test_expectations/angle_config.h
new file mode 100644
index 0000000..28b023b
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/angle_config.h
@@ -0,0 +1,45 @@
+//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
......@@ -25,27 +55,17 @@ diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectation
+#define DCHECK_NE(A,B) ASSERT((A) != (B))
+#define DCHECK(X) ASSERT(X)
+#define LOG(X) std::cerr
+#define StringPrintf FormatString
+
+#define GPU_EXPORT
+#define base
+
+typedef int32_t int32;
+typedef uint32_t uint32;
+typedef int64_t int64;
+typedef uint64_t uint64;
+
+// Shim Chromium's base by importing functions in the bsae namespace.
+namespace base
+{
+ using angle::HexStringToUInt;
+ using angle::ReadFileToString;
+ using angle::SplitString;
+ using angle::SplitStringAlongWhitespace;
+
+ // StringPrintf is called differently in ANGLE but using cannot change
+ // the name of the imported function. Use a define to change the name.
+ using ::FormatString;
+ #define StringPrintf FormatString
+}
+using namespace angle;
+
+// TODO(jmadill): other platforms
+#if defined(_WIN32) || defined(_WIN64)
......@@ -57,9 +77,10 @@ diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectation
+#endif
+
+#endif
diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/gpu_info.cc
--- gpu_test_expectations_reverted/gpu_info.cc 2015-08-20 17:01:42.800333630 -0400
+++ gpu_test_expectations/gpu_info.cc 2015-06-30 09:40:06.654788989 -0400
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_info.cc b/src/tests/third_party/gpu_test_expectations/gpu_info.cc
index 85d26fb..c8e2988 100644
--- a/src/tests/third_party/gpu_test_expectations/gpu_info.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_info.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -69,7 +90,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
namespace {
@@ -17,31 +17,6 @@ void EnumerateGPUDevice(const gpu::GPUIn
@@ -17,31 +17,6 @@ void EnumerateGPUDevice(const gpu::GPUInfo::GPUDevice& device,
enumerator->EndGPUDevice();
}
......@@ -125,7 +146,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
GPUDevice gpu;
std::vector<GPUDevice> secondary_gpus;
uint64 adapter_luid;
@@ -109,14 +77,6 @@ void GPUInfo::EnumerateFields(Enumerator
@@ -109,14 +77,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
int process_crash_count;
CollectInfoResult basic_info_state;
CollectInfoResult context_info_state;
......@@ -140,7 +161,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
};
// If this assert fails then most likely something below needs to be updated.
@@ -134,15 +94,9 @@ void GPUInfo::EnumerateFields(Enumerator
@@ -134,15 +94,9 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
EnumerateGPUDevice(secondary_gpu, enumerator);
enumerator->BeginAuxAttributes();
......@@ -156,7 +177,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
enumerator->AddInt64("adapterLuid", adapter_luid);
enumerator->AddString("driverVendor", driver_vendor);
enumerator->AddString("driverVersion", driver_version);
@@ -168,14 +122,6 @@ void GPUInfo::EnumerateFields(Enumerator
@@ -168,14 +122,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
enumerator->AddInt("processCrashCount", process_crash_count);
enumerator->AddInt("basicInfoState", basic_info_state);
enumerator->AddInt("contextInfoState", context_info_state);
......@@ -171,9 +192,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
enumerator->EndAuxAttributes();
}
diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gpu_info.h
--- gpu_test_expectations_reverted/gpu_info.h 2015-08-20 17:01:42.800333630 -0400
+++ gpu_test_expectations/gpu_info.h 2015-06-30 09:40:06.654788989 -0400
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_info.h b/src/tests/third_party/gpu_test_expectations/gpu_info.h
index f377698..35e791e 100644
--- a/src/tests/third_party/gpu_test_expectations/gpu_info.h
+++ b/src/tests/third_party/gpu_test_expectations/gpu_info.h
@@ -11,13 +11,7 @@
#include <string>
#include <vector>
......@@ -243,11 +265,11 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp
CollectInfoResult context_info_state;
-#if defined(OS_WIN)
- CollectInfoResult dx_diagnostics_info_state;
-
- // The information returned by the DirectX Diagnostics Tool.
- DxDiagNode dx_diagnostics;
-#endif
-
- VideoDecodeAcceleratorSupportedProfiles
- video_decode_accelerator_supported_profiles;
- VideoEncodeAcceleratorSupportedProfiles
......@@ -264,9 +286,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp
// Markers indicating that a GPUDevice is being described.
virtual void BeginGPUDevice() = 0;
diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectations/gpu_test_config.cc
--- gpu_test_expectations_reverted/gpu_test_config.cc 2015-08-20 17:01:42.800333630 -0400
+++ gpu_test_expectations/gpu_test_config.cc 2015-08-10 10:53:08.730302800 -0400
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc b/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
index 4605f89..1b4b47b 100644
--- a/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
@@ -2,20 +2,165 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -443,7 +466,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta
namespace gpu {
namespace {
@@ -292,21 +437,5 @@ bool GPUTestBotConfig::CurrentConfigMatc
@@ -292,21 +437,5 @@ bool GPUTestBotConfig::CurrentConfigMatches(
return false;
}
......@@ -465,9 +488,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta
-
} // namespace gpu
diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectations/gpu_test_config.h
--- gpu_test_expectations_reverted/gpu_test_config.h 2015-08-20 17:01:42.800333630 -0400
+++ gpu_test_expectations/gpu_test_config.h 2015-08-10 10:53:08.730302800 -0400
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config.h b/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
index 10ab9de..588b884 100644
--- a/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
@@ -8,9 +8,7 @@
#include <string>
#include <vector>
......@@ -479,7 +503,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat
namespace gpu {
@@ -132,9 +130,6 @@ class GPU_EXPORT GPUTestBotConfig : publ
@@ -132,9 +130,6 @@ class GPU_EXPORT GPUTestBotConfig : public GPUTestConfig {
// Check if this bot's config matches |config_data| or any of the |configs|.
static bool CurrentConfigMatches(const std::string& config_data);
static bool CurrentConfigMatches(const std::vector<std::string>& configs);
......@@ -489,10 +513,11 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat
};
} // namespace gpu
diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu_test_expectations/gpu_test_expectations_parser.cc
--- gpu_test_expectations_reverted/gpu_test_expectations_parser.cc 2015-08-20 17:01:42.800333630 -0400
+++ gpu_test_expectations/gpu_test_expectations_parser.cc 2015-08-20 17:11:07.415970863 -0400
@@ -2,14 +2,39 @@
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
index d44e5bb..5fe5c15 100644
--- a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
@@ -2,14 +2,35 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -507,8 +532,6 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
-#include "base/strings/stringprintf.h"
+#include "common/angleutils.h"
+
+namespace base {
+
+bool StartsWithASCII(const std::string& str,
+ const std::string& search,
+ bool case_sensitive) {
......@@ -534,12 +557,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
+bool LowerCaseEqualsASCII(const std::string& a, const char* b) {
+ return DoLowerCaseEqualsASCII(a.begin(), a.end(), b);
+}
+
+} // namespace base
namespace gpu {
@@ -144,9 +169,9 @@ const char* kErrorMessage[] = {
@@ -144,9 +165,9 @@ const char* kErrorMessage[] = {
};
Token ParseToken(const std::string& word) {
......@@ -551,7 +572,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
return kConfigGPUDeviceID;
for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) {
@@ -174,10 +199,10 @@ bool NamesMatching(const std::string& re
@@ -174,10 +195,10 @@ bool NamesMatching(const std::string& ref, const std::string& test_name) {
GPUTestExpectationsParser::GPUTestExpectationsParser() {
// Some sanity check.
......@@ -566,7 +587,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
}
GPUTestExpectationsParser::~GPUTestExpectationsParser() {
@@ -202,8 +227,8 @@ bool GPUTestExpectationsParser::LoadTest
@@ -202,8 +223,8 @@ bool GPUTestExpectationsParser::LoadTestExpectations(const std::string& data) {
return rt;
}
......@@ -577,7 +598,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
entries_.clear();
error_messages_.clear();
@@ -393,7 +418,7 @@ bool GPUTestExpectationsParser::ParseLin
@@ -393,7 +414,7 @@ bool GPUTestExpectationsParser::ParseLine(
stage++;
break;
default:
......@@ -586,7 +607,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
break;
}
}
@@ -481,7 +506,7 @@ bool GPUTestExpectationsParser::UpdateTe
@@ -481,7 +502,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig(
config->set_api(config->api() | kTokenData[token].flag);
break;
default:
......@@ -595,9 +616,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
break;
}
return true;
diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_test_expectations/gpu_test_expectations_parser.h
--- gpu_test_expectations_reverted/gpu_test_expectations_parser.h 2015-08-20 17:01:42.800333630 -0400
+++ gpu_test_expectations/gpu_test_expectations_parser.h 2015-06-30 09:40:06.654788989 -0400
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
index a69f7e9..a112700 100644
--- a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
@@ -8,10 +8,8 @@
#include <string>
#include <vector>
......@@ -611,7 +633,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_
namespace gpu {
@@ -32,7 +30,7 @@ class GPU_EXPORT GPUTestExpectationsPars
@@ -32,7 +30,7 @@ class GPU_EXPORT GPUTestExpectationsParser {
// save all the entries. Otherwise, generate error messages.
// Return true if parsing succeeds.
bool LoadTestExpectations(const std::string& data);
......@@ -620,29 +642,3 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_
// Query error messages from the last LoadTestExpectations() call.
const std::vector<std::string>& GetErrorMessages() const;
diff -u -rupN gpu_test_expectations_reverted/HowToMakeChanges.md gpu_test_expectations/HowToMakeChanges.md
--- gpu_test_expectations_reverted/HowToMakeChanges.md 1969-12-31 19:00:00.000000000 -0500
+++ gpu_test_expectations/HowToMakeChanges.md 2015-08-20 17:03:06.668881266 -0400
@@ -0,0 +1,22 @@
+Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config``
+directory, we want to keep a patch of the changes added to make it compile with ANGLE. This
+will allow us to merge Chromium changes easily in our ```gpu_test_expectations```.
+
+In order to make a change to this directory, do the following:
+
+ * copy the directory somewhere like in ```gpu_test_expectations_reverted```
+ * in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R < angle-mods.patch```
+ * do your changes in ```gpu_test_expectations```
+ * delete angle-mods.path in both directories
+ * run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch```
+ * copy ```angle-mods.patch``` in ```gpu_test_expectations```
+
+How to update from Chromium:
+
+ * ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit```
+ * Copy over Chromium files, ```git add . -u```, ```git commit```
+ * ```git revert HEAD~2```
+ * ```rm angle-mods.patch```
+ * ```git diff HEAD~1 (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend```
+ * ```git rebase -i``` to squash the three patches into one.
+
......@@ -21,27 +21,17 @@
#define DCHECK_NE(A,B) ASSERT((A) != (B))
#define DCHECK(X) ASSERT(X)
#define LOG(X) std::cerr
#define StringPrintf FormatString
#define GPU_EXPORT
#define base
typedef int32_t int32;
typedef uint32_t uint32;
typedef int64_t int64;
typedef uint64_t uint64;
// Shim Chromium's base by importing functions in the bsae namespace.
namespace base
{
using angle::HexStringToUInt;
using angle::ReadFileToString;
using angle::SplitString;
using angle::SplitStringAlongWhitespace;
// StringPrintf is called differently in ANGLE but using cannot change
// the name of the imported function. Use a define to change the name.
using ::FormatString;
#define StringPrintf FormatString
}
using namespace angle;
// TODO(jmadill): other platforms
#if defined(_WIN32) || defined(_WIN64)
......
......@@ -6,8 +6,6 @@
#include "common/angleutils.h"
namespace base {
bool StartsWithASCII(const std::string& str,
const std::string& search,
bool case_sensitive) {
......@@ -34,8 +32,6 @@ bool LowerCaseEqualsASCII(const std::string& a, const char* b) {
return DoLowerCaseEqualsASCII(a.begin(), a.end(), b);
}
} // namespace base
namespace gpu {
namespace {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment