summaryrefslogtreecommitdiff
path: root/chromium/components/metal_util/test_shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/metal_util/test_shader.h')
-rw-r--r--chromium/components/metal_util/test_shader.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/chromium/components/metal_util/test_shader.h b/chromium/components/metal_util/test_shader.h
index c892b5cd1d4..5e1d9863a97 100644
--- a/chromium/components/metal_util/test_shader.h
+++ b/chromium/components/metal_util/test_shader.h
@@ -31,15 +31,14 @@ enum class METAL_UTIL_EXPORT TestShaderResult {
};
using TestShaderCallback =
- base::OnceCallback<void(TestShaderResult result,
- const base::TimeDelta& method_time,
+ base::OnceCallback<void(TestShaderComponent component,
+ TestShaderResult result,
const base::TimeDelta& compile_time)>;
// A default timeout value for compiling the test shader.
constexpr base::TimeDelta kTestShaderTimeout = base::TimeDelta::FromMinutes(1);
-// Return the value kTestShaderTimeoutTime for |method_time| and |compile_time|
-// if they time out.
+// Return the value kTestShaderTimeoutTime for |compile_time| if it times out.
constexpr base::TimeDelta kTestShaderTimeForever =
base::TimeDelta::FromMinutes(3);
@@ -49,7 +48,8 @@ constexpr base::TimeDelta kTestShaderDelay = base::TimeDelta::FromMinutes(3);
// Attempt to asynchronously compile a trivial Metal shader. If |delay| is zero,
// then compile synchronously, otherwise, post a delayed task to do the compile.
// |callback| with the result when the shader succeeds or after |timeout| has
-// elapsed.
+// elapsed. Whether compile or link was tested is communicated to |callback| in
+// its |component| argument.
//
// This is used to determine of the Metal shader compiler is resposive. Note
// that |callback| will be called either on another thread or inside the
@@ -58,8 +58,7 @@ constexpr base::TimeDelta kTestShaderDelay = base::TimeDelta::FromMinutes(3);
void METAL_UTIL_EXPORT
TestShader(TestShaderCallback callback,
const base::TimeDelta& delay = kTestShaderDelay,
- const base::TimeDelta& timeout = kTestShaderTimeout,
- TestShaderComponent component = TestShaderComponent::kLink);
+ const base::TimeDelta& timeout = kTestShaderTimeForever);
} // namespace metal