Skip to content

Commit ea8a61c

Browse files
OMWAI-3261: formatting fixed (chinmaygarde#10)
1 parent c07d227 commit ea8a61c

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

src/wayland_display.cc

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@
4242

4343
DBG_TIMING(
4444
#define gettid() syscall(SYS_gettid)
45-
static uint64_t t00;
46-
)
45+
static uint64_t t00;)
4746

4847
namespace flutter {
4948

@@ -355,10 +354,10 @@ const struct wp_presentation_feedback_listener WaylandDisplay::kPresentationFeed
355354
}
356355

357356
DBG_TIMING({
358-
static auto t0 = FlutterEngineGetCurrentTime();
359-
const auto t1 = FlutterEngineGetCurrentTime();
357+
static auto t0 = FlutterEngineGetCurrentTime();
358+
const auto t1 = FlutterEngineGetCurrentTime();
360359
// dbgI("[%09.4f][%ld] presented: %09lldns flags:%08x p2p-diff:%5lldus rerfresh:%u\n", (t1-t00)/1e9, gettid(), (new_last_frame_ns-t00), flags, (new_last_frame_ns - wd->vsync.last_frame_)/1000, refresh);
361-
dbgI("[%09.4f][%ld] presented %09.4f f:%08x dc:%.5f df:%.5f r:%u\n", (t1-t00)/1e9, gettid(), (new_last_frame_ns-t00)/1e9, flags, (t1 - t0)/1e9, (new_last_frame_ns - wd->vsync.last_frame_)/1e9, refresh);
360+
dbgI("[%09.4f][%ld] presented %09.4f f:%08x dc:%.5f df:%.5f r:%u\n", (t1 - t00) / 1e9, gettid(), (new_last_frame_ns - t00) / 1e9, flags, (t1 - t0) / 1e9, (new_last_frame_ns - wd->vsync.last_frame_) / 1e9, refresh);
362361
t0 = t1;
363362
})
364363

@@ -517,7 +516,7 @@ WaylandDisplay::WaylandDisplay(size_t width, size_t height, const std::string &b
517516
return;
518517
}
519518

520-
DBG_TIMING({t00 = FlutterEngineGetCurrentTime();});
519+
DBG_TIMING({ t00 = FlutterEngineGetCurrentTime(); });
521520
valid_ = true;
522521
}
523522

@@ -550,23 +549,15 @@ bool WaylandDisplay::SetupEngine(const std::string &bundle_path, const std::vect
550549
config.open_gl.present = [](void *data) -> bool {
551550
WaylandDisplay *const wd = get_wayland_display(data);
552551

553-
DBG_TIMING(
554-
static auto tprev = FlutterEngineGetCurrentTime();
555-
auto tb = FlutterEngineGetCurrentTime();
556-
dbgI("[%09.4f][%ld] >>> swap buffer [%09.4f]\n", (tb-t00)/1e9, gettid(), (tb-tprev)/1e9);
557-
);
552+
DBG_TIMING(static auto tprev = FlutterEngineGetCurrentTime(); auto tb = FlutterEngineGetCurrentTime(); dbgI("[%09.4f][%ld] >>> swap buffer [%09.4f]\n", (tb - t00) / 1e9, gettid(), (tb - tprev) / 1e9););
558553

559554
if (eglSwapBuffers(wd->egl_display_, wd->egl_surface_) != EGL_TRUE) {
560555
LogLastEGLError();
561556
dbgE("Could not swap the EGL buffer\n");
562557
return false;
563558
}
564559

565-
DBG_TIMING(
566-
auto ta = FlutterEngineGetCurrentTime();
567-
dbgI("[%09.4f][%ld] <<< swap buffer [dur:%09.4f]\n", (ta-t00)/1e9, gettid(), (ta-tb)/1e9);
568-
tprev = tb;
569-
);
560+
DBG_TIMING(auto ta = FlutterEngineGetCurrentTime(); dbgI("[%09.4f][%ld] <<< swap buffer [dur:%09.4f]\n", (ta - t00) / 1e9, gettid(), (ta - tb) / 1e9); tprev = tb;);
570561

571562
return true;
572563
};
@@ -624,7 +615,7 @@ bool WaylandDisplay::SetupEngine(const std::string &bundle_path, const std::vect
624615

625616
DBG_TIMING({
626617
auto tx = FlutterEngineGetCurrentTime();
627-
dbgI("[%09.4f][%ld] vsync callback [%jx]\n", (tx-t00)/1e9, gettid(), static_cast<uintmax_t>(baton));
618+
dbgI("[%09.4f][%ld] vsync callback [%jx]\n", (tx - t00) / 1e9, gettid(), static_cast<uintmax_t>(baton));
628619
});
629620

630621
if (wd->vsync.baton_ != 0) {
@@ -810,10 +801,9 @@ ssize_t WaylandDisplay::vSyncHandler() {
810801
intptr_t baton = std::atomic_exchange(&vsync.baton_, 0);
811802

812803
DBG_TIMING({
813-
auto tx = FlutterEngineGetCurrentTime();
814-
dbgI("[%09.4f][%ld] flutterEngineOnVsync [%jx] (t:%09.4f d:%09.4f vb:%09.4f c:%09.4f f:%09.4f)\n",
815-
(tx-t00)/1e9, gettid(), static_cast<uintmax_t>(baton), (t_now_ns-t00)/1e9, (t_now_ns-vsync.last_frame_)/1e9,
816-
vsync.vblank_time_ns_/1e9, (current_ns-t00)/1e9, (finish_time_ns-t00)/1e9);
804+
auto tx = FlutterEngineGetCurrentTime();
805+
dbgI("[%09.4f][%ld] flutterEngineOnVsync [%jx] (t:%09.4f d:%09.4f vb:%09.4f c:%09.4f f:%09.4f)\n", (tx - t00) / 1e9, gettid(), static_cast<uintmax_t>(baton), (t_now_ns - t00) / 1e9, (t_now_ns - vsync.last_frame_) / 1e9,
806+
vsync.vblank_time_ns_ / 1e9, (current_ns - t00) / 1e9, (finish_time_ns - t00) / 1e9);
817807
});
818808

819809
const auto status = FlutterEngineOnVsync(engine_, baton, current_ns, finish_time_ns);
@@ -946,7 +936,7 @@ bool WaylandDisplay::Run() {
946936
if (vsync.presentation_clk_id_ != UINT32_MAX && presentation_ != nullptr) {
947937
DBG_TIMING({
948938
auto tx = FlutterEngineGetCurrentTime();
949-
dbgI("[%09.4f][%ld] add listener\n", (tx-t00)/1e9, gettid());
939+
dbgI("[%09.4f][%ld] add listener\n", (tx - t00) / 1e9, gettid());
950940
});
951941
wp_presentation_feedback_add_listener(::wp_presentation_feedback(presentation_, surface_), &kPresentationFeedbackListener, this);
952942
wl_display_dispatch_pending(display_);

0 commit comments

Comments
 (0)