diff --git a/src/gui/core/canvas.cpp b/src/gui/core/canvas.cpp index bf9fc5d853fa..248a866fc36b 100644 --- a/src/gui/core/canvas.cpp +++ b/src/gui/core/canvas.cpp @@ -1453,7 +1453,7 @@ void canvas::draw(const bool force) is_dirty_ = false; } -void canvas::blit(surface& /*surf*/, SDL_Rect rect) +void canvas::render(SDL_Rect rect) { SDL_RenderSetViewport(renderer_, &rect); diff --git a/src/gui/core/canvas.hpp b/src/gui/core/canvas.hpp index 0b9ab5bc6365..f740fab4e81f 100644 --- a/src/gui/core/canvas.hpp +++ b/src/gui/core/canvas.hpp @@ -102,15 +102,14 @@ class canvas void draw(const bool force = false); /** - * Blits the canvas unto another surface. + * Copies the canvas texture to the screen renderer. * * It makes sure the image on the canvas is up to date. Also executes the * pre-blitting functions. * - * @param surf The surface to blit upon. * @param rect The place to blit to. */ - void blit(surface& surf, SDL_Rect rect); + void render(SDL_Rect rect); /** * Sets the config. diff --git a/src/gui/widgets/panel.cpp b/src/gui/widgets/panel.cpp index fd8b9dbb9ad2..6e65989da5e0 100644 --- a/src/gui/widgets/panel.cpp +++ b/src/gui/widgets/panel.cpp @@ -61,20 +61,18 @@ unsigned panel::get_state() const return 0; } -void panel::impl_draw_background(surface& frame_buffer, int x_offset, int y_offset) +void panel::impl_draw_background(surface& /*frame_buffer*/, int x_offset, int y_offset) { DBG_GUI_D << LOG_HEADER << " size " << get_rectangle() << ".\n"; - get_canvas(0).blit(frame_buffer, - calculate_blitting_rectangle(x_offset, y_offset)); + get_canvas(0).render(calculate_blitting_rectangle(x_offset, y_offset)); } -void panel::impl_draw_foreground(surface& frame_buffer, int x_offset, int y_offset) +void panel::impl_draw_foreground(surface& /*frame_buffer*/, int x_offset, int y_offset) { DBG_GUI_D << LOG_HEADER << " size " << get_rectangle() << ".\n"; - get_canvas(1).blit(frame_buffer, - calculate_blitting_rectangle(x_offset, y_offset)); + get_canvas(1).render(calculate_blitting_rectangle(x_offset, y_offset)); } point panel::border_space() const diff --git a/src/gui/widgets/styled_widget.cpp b/src/gui/widgets/styled_widget.cpp index 482f4771c492..4aaff48dbcb9 100644 --- a/src/gui/widgets/styled_widget.cpp +++ b/src/gui/widgets/styled_widget.cpp @@ -431,15 +431,14 @@ int styled_widget::get_text_maximum_height() const return get_height() - config_->text_extra_height; } -void styled_widget::impl_draw_background(surface& frame_buffer, +void styled_widget::impl_draw_background(surface& /*frame_buffer*/, int x_offset, int y_offset) { DBG_GUI_D << LOG_HEADER << " label '" << debug_truncate(label_) << "' size " << get_rectangle() << ".\n"; - get_canvas(get_state()).blit(frame_buffer, - calculate_blitting_rectangle(x_offset, y_offset)); + get_canvas(get_state()).render(calculate_blitting_rectangle(x_offset, y_offset)); } void styled_widget::impl_draw_foreground(surface& /*frame_buffer*/