5 #ifndef FLUTTER_IMPELLER_PLAYGROUND_COMPUTE_PLAYGROUND_TEST_H_
6 #define FLUTTER_IMPELLER_PLAYGROUND_COMPUTE_PLAYGROUND_TEST_H_
10 #include "flutter/fml/time/time_delta.h"
11 #include "flutter/testing/testing.h"
19 public ::testing::TestWithParam<PlaygroundBackend> {
25 void SetUp()
override;
31 std::string asset_name)
const override;
38 const std::shared_ptr<Context>& context,
39 const std::string& label) {
42 desc.
size =
sizeof(T);
43 auto buffer = context->GetResourceAllocator()->CreateBuffer(desc);
44 buffer->SetLabel(label);
49 fml::TimeDelta start_time_;
56 #define INSTANTIATE_COMPUTE_SUITE(playground) \
57 INSTANTIATE_TEST_SUITE_P( \
58 Compute, playground, \
59 ::testing::Values(PlaygroundBackend::kMetal, \
60 PlaygroundBackend::kVulkan), \
61 [](const ::testing::TestParamInfo<ComputePlaygroundTest::ParamType>& \
62 info) { return PlaygroundBackendToString(info.param); });
std::shared_ptr< DeviceBuffer > CreateHostVisibleDeviceBuffer(const std::shared_ptr< Context > &context, const std::string &label)
virtual ~ComputePlaygroundTest()
std::string GetWindowTitle() const override
std::unique_ptr< fml::Mapping > OpenAssetAsMapping(std::string asset_name) const override