Skip to content

Commit

Permalink
Method renamed to reflect its conditional nature
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfryd committed Dec 21, 2024
1 parent 0514b75 commit bbc5d94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ void Display::render_help() {
}
}

bool Display::refresh(const AVFrame* left_frame, const AVFrame* right_frame, const std::string& current_total_browsable, const std::string& message) {
bool Display::possibly_refresh(const AVFrame* left_frame, const AVFrame* right_frame, const std::string& current_total_browsable, const std::string& message) {
const bool has_updated_left_pts = previous_left_frame_pts_ != left_frame->pts;
const bool has_updated_right_pts = previous_right_frame_pts_ != right_frame->pts;

Expand Down
2 changes: 1 addition & 1 deletion display.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class Display {
~Display();

// Copy frame to display
bool refresh(const AVFrame* left_frame, const AVFrame* right_frame, const std::string& current_total_browsable, const std::string& message);
bool possibly_refresh(const AVFrame* left_frame, const AVFrame* right_frame, const std::string& current_total_browsable, const std::string& message);

// Handle events
void input();
Expand Down
2 changes: 1 addition & 1 deletion video_compare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ void VideoCompare::compare() {
// conditionally update the display; otherwise, sleep to conserve resources
display_refresh_timer.update();

if (display_->refresh(left_display_frame, right_display_frame, current_total_browsable, message)) {
if (display_->possibly_refresh(left_display_frame, right_display_frame, current_total_browsable, message)) {
refresh_time_deque.push_back(-display_refresh_timer.us_until_target());
} else {
sleep_for_ms(refresh_time_deque.average() / 1000);
Expand Down

0 comments on commit bbc5d94

Please sign in to comment.