summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/tests/third_party/gpu_test_expectations/angle_config.h
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /gfx/angle/src/tests/third_party/gpu_test_expectations/angle_config.h
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/angle/src/tests/third_party/gpu_test_expectations/angle_config.h')
-rwxr-xr-xgfx/angle/src/tests/third_party/gpu_test_expectations/angle_config.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/gfx/angle/src/tests/third_party/gpu_test_expectations/angle_config.h b/gfx/angle/src/tests/third_party/gpu_test_expectations/angle_config.h
new file mode 100755
index 000000000..4e46f98cc
--- /dev/null
+++ b/gfx/angle/src/tests/third_party/gpu_test_expectations/angle_config.h
@@ -0,0 +1,66 @@
+//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// angle_config.h:
+// Helpers for importing the gpu test expectations package from Chrome.
+//
+
+#ifndef GPU_TEST_EXPECTATIONS_ANGLE_CONFIG_H_
+#define GPU_TEST_EXPECTATIONS_ANGLE_CONFIG_H_
+
+#include <stdint.h>
+
+#include <iostream>
+
+#include "common/debug.h"
+#include "common/string_utils.h"
+
+#define DCHECK_EQ(A,B) ASSERT((A) == (B))
+#define DCHECK_NE(A,B) ASSERT((A) != (B))
+#define DCHECK(X) ASSERT(X)
+#define LOG(X) std::cerr
+
+#define GPU_EXPORT
+
+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 base namespace.
+namespace base
+{
+ using angle::kWhitespaceASCII;
+ using angle::TRIM_WHITESPACE;
+ using angle::KEEP_WHITESPACE;
+ using angle::SPLIT_WANT_ALL;
+ using angle::SPLIT_WANT_NONEMPTY;
+ using angle::SplitString;
+ using angle::SplitStringAlongWhitespace;
+ using angle::HexStringToUInt;
+ using angle::ReadFileToString;
+
+ // 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
+}
+
+// TODO(jmadill): other platforms
+// clang-format off
+#if defined(_WIN32) || defined(_WIN64)
+# define OS_WIN
+#elif defined(ANDROID)
+# define OS_ANDROID
+#elif defined(__linux__)
+# define OS_LINUX
+#elif defined(__APPLE__)
+# define OS_MACOSX
+#else
+# error "Unsupported platform"
+#endif
+// clang-format on
+
+#endif