forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
task_runners.h
49 lines (33 loc) · 1.21 KB
/
task_runners.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_COMMON_TASK_RUNNERS_H_
#define FLUTTER_COMMON_TASK_RUNNERS_H_
#include <string>
#include "flutter/fml/macros.h"
#include "flutter/fml/task_runner.h"
namespace flutter {
class TaskRunners {
public:
TaskRunners(std::string label,
fml::RefPtr<fml::TaskRunner> platform,
fml::RefPtr<fml::TaskRunner> raster,
fml::RefPtr<fml::TaskRunner> ui,
fml::RefPtr<fml::TaskRunner> io);
TaskRunners(const TaskRunners& other);
~TaskRunners();
const std::string& GetLabel() const;
fml::RefPtr<fml::TaskRunner> GetPlatformTaskRunner() const;
fml::RefPtr<fml::TaskRunner> GetUITaskRunner() const;
fml::RefPtr<fml::TaskRunner> GetIOTaskRunner() const;
fml::RefPtr<fml::TaskRunner> GetRasterTaskRunner() const;
bool IsValid() const;
private:
const std::string label_;
fml::RefPtr<fml::TaskRunner> platform_;
fml::RefPtr<fml::TaskRunner> raster_;
fml::RefPtr<fml::TaskRunner> ui_;
fml::RefPtr<fml::TaskRunner> io_;
};
} // namespace flutter
#endif // FLUTTER_COMMON_TASK_RUNNERS_H_