Removed CVideo::blit_surface
Used to be a surface drawing helper for blitting on the framebuffer surface. I made it work with accelerated rendering by forwarding it to render_copy, but we don't need it anymore. All but one of its usecases have been removed.
This commit is contained in:
parent
c453a97dac
commit
b08fa98260
3 changed files with 3 additions and 24 deletions
|
@ -234,7 +234,9 @@ void tristate_button::draw_contents() {
|
|||
bg_restore();
|
||||
|
||||
image = nbase;
|
||||
video().blit_surface(loc.x, loc.y, image);
|
||||
UNUSED(loc);
|
||||
UNUSED(image);
|
||||
//video().blit_surface(loc.x, loc.y, image);
|
||||
}
|
||||
|
||||
//TODO move to widget
|
||||
|
|
|
@ -109,16 +109,6 @@ void CVideo::video_event_handler::handle_window_event(const SDL_Event& event)
|
|||
}
|
||||
}
|
||||
|
||||
void CVideo::blit_surface(int x, int y, surface surf, SDL_Rect* srcrect, SDL_Rect* clip_rect)
|
||||
{
|
||||
texture txt(surf);
|
||||
|
||||
render_clip_rect_setter crs(clip_rect);
|
||||
|
||||
SDL_Rect dst {x, y, surf->w, surf->h};
|
||||
render_copy(txt, srcrect, &dst);
|
||||
}
|
||||
|
||||
void CVideo::make_fake()
|
||||
{
|
||||
fake_screen_ = true;
|
||||
|
|
|
@ -154,19 +154,6 @@ public:
|
|||
|
||||
/***** ***** ***** ***** Drawing functions ***** ***** ****** *****/
|
||||
|
||||
/**
|
||||
* Draws a surface directly onto the screen framebuffer.
|
||||
*
|
||||
* @param x The x coordinate at which to draw.
|
||||
* @param y The y coordinate at which to draw.
|
||||
* @param surf The surface to draw.
|
||||
* @param srcrect The area of the surface to draw. This defaults to nullptr,
|
||||
* which implies the entire thing.
|
||||
* @param clip_rect The clippin rect. If not null, the surface will only be drawn
|
||||
* within the bounds of the given rectangle.
|
||||
*/
|
||||
void blit_surface(int x, int y, surface surf, SDL_Rect* srcrect = nullptr, SDL_Rect* clip_rect = nullptr);
|
||||
|
||||
private:
|
||||
/** Renders the screen. */
|
||||
void render_screen();
|
||||
|
|
Loading…
Add table
Reference in a new issue