Skip to content

Commit

Permalink
Clean up high-dpi todos and comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
mesilliac committed May 8, 2022
1 parent 98b2f50 commit 36ece6b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/gui/core/canvas.hpp
Expand Up @@ -112,7 +112,6 @@ class canvas
* pre-blitting functions.
*
* @param rect Where to blit to, in drawing coordinates.
surface.)
*/
void blit(SDL_Rect rect);

Expand Down
4 changes: 0 additions & 4 deletions src/gui/widgets/window.cpp
Expand Up @@ -581,7 +581,6 @@ int window::show(const bool restore, const unsigned auto_close_timeout)
if(restore_) {
SDL_Rect rect = get_rectangle();
video_.blit_texture(restorer_, &rect);
// TODO: highdpi - reimplement / fix this
font::undraw_floating_labels();
}
throw;
Expand All @@ -593,7 +592,6 @@ int window::show(const bool restore, const unsigned auto_close_timeout)
if(restore_) {
SDL_Rect rect = get_rectangle();
video_.blit_texture(restorer_, &rect);
// TODO: highdpi - reimplement / fix this
font::undraw_floating_labels();
}

Expand Down Expand Up @@ -630,12 +628,10 @@ void window::draw()
// We want the labels underneath the window so draw them and use them
// as restore point.
if(is_toplevel_) {
// TODO: highdpi - reimplement / fix this
font::draw_floating_labels();
}

if(restore_) {
// TODO: highdpi - reimplement / fix this
restorer_ = video_.read_texture(&rect);
}

Expand Down
1 change: 0 additions & 1 deletion src/help/help_text_area.cpp
Expand Up @@ -553,7 +553,6 @@ void help_text_area::draw_contents()
it->rect.h - i * 2
};

// TODO: highdpi - fix
// SDL 2.0.10's render batching changes result in the
// surface's clipping rectangle being overridden even if
// no render clipping rectangle set operaton was queued,
Expand Down
2 changes: 0 additions & 2 deletions src/sdl/utils.cpp
Expand Up @@ -2132,8 +2132,6 @@ void blit_surface(const surface& surf,
}
}

// TODO: highdpi - this will break as soon as things start rendering with textures.
// fix shouldn't be too hard - just pull pixels from the render target, not the drawing surface.
surface get_surface_portion(const surface &src, SDL_Rect &area)
{
if (src == nullptr) {
Expand Down
2 changes: 0 additions & 2 deletions src/widgets/widget.cpp
Expand Up @@ -240,7 +240,6 @@ void widget::bg_update()

void widget::bg_restore() const
{
// TODO: highdpi - this is ugly
auto clipper = video().set_clip(clip_ ? clip_rect_ : video().draw_area());

if (needs_restore_) {
Expand All @@ -253,7 +252,6 @@ void widget::bg_restore() const

void widget::bg_restore(const SDL_Rect& rect) const
{
// TODO: highdpi - this is ugly
auto clipper = video().set_clip(clip_ ? clip_rect_ : video().draw_area());

for(std::vector< surface_restorer >::const_iterator i = restorer_.begin(),
Expand Down

0 comments on commit 36ece6b

Please sign in to comment.