您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

46 行
1.1 KiB

#include "task_runners.h"
#include <utility>
namespace uiwidgets {
TaskRunners::TaskRunners(std::string label,
fml::RefPtr<fml::TaskRunner> platform,
fml::RefPtr<fml::TaskRunner> raster,
fml::RefPtr<fml::TaskRunner> ui,
fml::RefPtr<fml::TaskRunner> io)
: label_(std::move(label)),
platform_(std::move(platform)),
raster_(std::move(raster)),
ui_(std::move(ui)),
io_(std::move(io)) {}
TaskRunners::TaskRunners(const TaskRunners& other) = default;
TaskRunners::~TaskRunners() = default;
const std::string& TaskRunners::GetLabel() const {
return label_;
}
fml::RefPtr<fml::TaskRunner> TaskRunners::GetPlatformTaskRunner() const {
return platform_;
}
fml::RefPtr<fml::TaskRunner> TaskRunners::GetUITaskRunner() const {
return ui_;
}
fml::RefPtr<fml::TaskRunner> TaskRunners::GetIOTaskRunner() const {
return io_;
}
fml::RefPtr<fml::TaskRunner> TaskRunners::GetRasterTaskRunner() const {
return raster_;
}
bool TaskRunners::IsValid() const {
return platform_ && raster_ && ui_ && io_;
}
} // namespace uiwidgets