@@ -28,10 +28,16 @@ class TizenRenderer;
28
28
class TizenEventLoop {
29
29
public:
30
30
using TaskExpiredCallback = std::function<void (const FlutterTask*)>;
31
+
31
32
TizenEventLoop (std::thread::id main_thread_id,
32
33
CurrentTimeProc get_current_time,
33
34
TaskExpiredCallback on_task_expired);
34
35
virtual ~TizenEventLoop ();
36
+
37
+ // Prevent copying.
38
+ TizenEventLoop (const TizenEventLoop&) = delete ;
39
+ TizenEventLoop& operator =(const TizenEventLoop&) = delete ;
40
+
35
41
bool RunsTasksOnCurrentThread () const ;
36
42
37
43
void ExcuteTaskEvents (
@@ -44,6 +50,7 @@ class TizenEventLoop {
44
50
45
51
protected:
46
52
using TaskTimePoint = std::chrono::steady_clock::time_point;
53
+
47
54
struct Task {
48
55
uint64_t order;
49
56
TaskTimePoint fire_time;
@@ -58,6 +65,7 @@ class TizenEventLoop {
58
65
}
59
66
};
60
67
};
68
+
61
69
std::thread::id main_thread_id_;
62
70
CurrentTimeProc get_current_time_;
63
71
TaskExpiredCallback on_task_expired_;
@@ -71,16 +79,12 @@ class TizenEventLoop {
71
79
private:
72
80
Ecore_Pipe* ecore_pipe_;
73
81
74
- TizenEventLoop (const TizenEventLoop&) = delete ;
75
-
76
- TizenEventLoop& operator =(const TizenEventLoop&) = delete ;
82
+ // Returns a TaskTimePoint computed from the given target time from Flutter.
83
+ TaskTimePoint TimePointFromFlutterTime (uint64_t flutter_target_time_nanos);
77
84
78
85
static void ExcuteTaskEvents (void * data, void * buffer, unsigned int nbyte);
79
86
80
87
static Eina_Bool TaskTimerCallback (void * data);
81
-
82
- // Returns a TaskTimePoint computed from the given target time from Flutter.
83
- TaskTimePoint TimePointFromFlutterTime (uint64_t flutter_target_time_nanos);
84
88
};
85
89
86
90
class TizenPlatformEventLoop : public TizenEventLoop {
@@ -89,6 +93,7 @@ class TizenPlatformEventLoop : public TizenEventLoop {
89
93
CurrentTimeProc get_current_time,
90
94
TaskExpiredCallback on_task_expired);
91
95
virtual ~TizenPlatformEventLoop ();
96
+
92
97
virtual void OnTaskExpired () override ;
93
98
};
94
99
@@ -100,13 +105,14 @@ class TizenRenderEventLoop : public TizenEventLoop {
100
105
TaskExpiredCallback on_task_expired,
101
106
TizenRenderer* renderer);
102
107
virtual ~TizenRenderEventLoop ();
108
+
103
109
virtual void OnTaskExpired () override ;
104
110
105
111
private:
106
112
TizenRenderer* renderer_{nullptr };
107
113
std::atomic_bool has_pending_renderer_callback_{false };
108
114
};
109
- #endif
115
+ #endif // TIZEN_RENDERER_EVAS_GL
110
116
111
117
} // namespace flutter
112
118
0 commit comments