5 #ifndef FLUTTER_IMPELLER_PLAYGROUND_COMPUTE_PLAYGROUND_TEST_H_
6 #define FLUTTER_IMPELLER_PLAYGROUND_COMPUTE_PLAYGROUND_TEST_H_
10 #include "flutter/fml/macros.h"
11 #include "flutter/fml/time/time_delta.h"
12 #include "flutter/testing/testing.h"
21 public ::testing::TestWithParam<PlaygroundBackend> {
27 void SetUp()
override;
33 std::string asset_name)
const override;
40 const std::shared_ptr<Context>& context,
41 const std::string& label) {
44 desc.
size =
sizeof(T);
45 auto buffer = context->GetResourceAllocator()->CreateBuffer(desc);
46 buffer->SetLabel(label);
51 fml::TimeDelta start_time_;
58 #define INSTANTIATE_COMPUTE_SUITE(playground) \
59 INSTANTIATE_TEST_SUITE_P( \
60 Compute, playground, \
61 ::testing::Values(PlaygroundBackend::kMetal, \
62 PlaygroundBackend::kVulkan), \
63 [](const ::testing::TestParamInfo<ComputePlaygroundTest::ParamType>& \
64 info) { return PlaygroundBackendToString(info.param); });
68 #endif // FLUTTER_IMPELLER_PLAYGROUND_COMPUTE_PLAYGROUND_TEST_H_