Flutter Engine
The Flutter Engine
task_runners.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/common/task_runners.h"
6
7#include <utility>
8
9namespace flutter {
10
11TaskRunners::TaskRunners(std::string label,
16 : label_(std::move(label)),
17 platform_(std::move(platform)),
18 raster_(std::move(raster)),
19 ui_(std::move(ui)),
20 io_(std::move(io)) {}
21
22TaskRunners::TaskRunners(const TaskRunners& other) = default;
23
25
26const std::string& TaskRunners::GetLabel() const {
27 return label_;
28}
29
31 return platform_;
32}
33
35 return ui_;
36}
37
39 return io_;
40}
41
43 return raster_;
44}
45
47 return platform_ && raster_ && ui_ && io_;
48}
49
50} // namespace flutter
bool IsValid() const
Definition: task_runners.cc:46
TaskRunners(std::string label, fml::RefPtr< fml::TaskRunner > platform, fml::RefPtr< fml::TaskRunner > raster, fml::RefPtr< fml::TaskRunner > ui, fml::RefPtr< fml::TaskRunner > io)
Definition: task_runners.cc:11
fml::RefPtr< fml::TaskRunner > GetRasterTaskRunner() const
Definition: task_runners.cc:42
fml::RefPtr< fml::TaskRunner > GetUITaskRunner() const
Definition: task_runners.cc:34
fml::RefPtr< fml::TaskRunner > GetIOTaskRunner() const
Definition: task_runners.cc:38
fml::RefPtr< fml::TaskRunner > GetPlatformTaskRunner() const
Definition: task_runners.cc:30
const std::string & GetLabel() const
Definition: task_runners.cc:26
Definition: ref_ptr.h:256