Skip to content

Commit 3b1c6a7

Browse files
committed
Additional clean-ups
1 parent f6318c0 commit 3b1c6a7

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

shell/platform/tizen/tizen_event_loop.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,6 @@ void TizenRenderEventLoop::OnTaskExpired() {
155155
// Do nothing
156156
}
157157
}
158-
#endif
158+
#endif // TIZEN_RENDERER_EVAS_GL
159159

160160
} // namespace flutter

shell/platform/tizen/tizen_event_loop.h

+13-7
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@ class TizenRenderer;
2828
class TizenEventLoop {
2929
public:
3030
using TaskExpiredCallback = std::function<void(const FlutterTask*)>;
31+
3132
TizenEventLoop(std::thread::id main_thread_id,
3233
CurrentTimeProc get_current_time,
3334
TaskExpiredCallback on_task_expired);
3435
virtual ~TizenEventLoop();
36+
37+
// Prevent copying.
38+
TizenEventLoop(const TizenEventLoop&) = delete;
39+
TizenEventLoop& operator=(const TizenEventLoop&) = delete;
40+
3541
bool RunsTasksOnCurrentThread() const;
3642

3743
void ExcuteTaskEvents(
@@ -44,6 +50,7 @@ class TizenEventLoop {
4450

4551
protected:
4652
using TaskTimePoint = std::chrono::steady_clock::time_point;
53+
4754
struct Task {
4855
uint64_t order;
4956
TaskTimePoint fire_time;
@@ -58,6 +65,7 @@ class TizenEventLoop {
5865
}
5966
};
6067
};
68+
6169
std::thread::id main_thread_id_;
6270
CurrentTimeProc get_current_time_;
6371
TaskExpiredCallback on_task_expired_;
@@ -71,16 +79,12 @@ class TizenEventLoop {
7179
private:
7280
Ecore_Pipe* ecore_pipe_;
7381

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);
7784

7885
static void ExcuteTaskEvents(void* data, void* buffer, unsigned int nbyte);
7986

8087
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);
8488
};
8589

8690
class TizenPlatformEventLoop : public TizenEventLoop {
@@ -89,6 +93,7 @@ class TizenPlatformEventLoop : public TizenEventLoop {
8993
CurrentTimeProc get_current_time,
9094
TaskExpiredCallback on_task_expired);
9195
virtual ~TizenPlatformEventLoop();
96+
9297
virtual void OnTaskExpired() override;
9398
};
9499

@@ -100,13 +105,14 @@ class TizenRenderEventLoop : public TizenEventLoop {
100105
TaskExpiredCallback on_task_expired,
101106
TizenRenderer* renderer);
102107
virtual ~TizenRenderEventLoop();
108+
103109
virtual void OnTaskExpired() override;
104110

105111
private:
106112
TizenRenderer* renderer_{nullptr};
107113
std::atomic_bool has_pending_renderer_callback_{false};
108114
};
109-
#endif
115+
#endif // TIZEN_RENDERER_EVAS_GL
110116

111117
} // namespace flutter
112118

0 commit comments

Comments
 (0)