Removed remaining references to window framebuffer surface

This commit is contained in:
Charles Dang 2018-03-24 10:31:04 +11:00
parent c7367344b1
commit 85dcef7fa0
5 changed files with 4 additions and 19 deletions

View file

@ -707,7 +707,8 @@ surface display::screenshot(bool map_screenshot)
if(!map_screenshot) {
// Use make_neutral_surface() to copy surface content
// TODO: convert to texture handling
return make_neutral_surface(video_.getSurface());
//return make_neutral_surface(video_.getSurface());
return surface(nullptr);
}
if(get_map().empty()) {

View file

@ -197,13 +197,13 @@ SDL_Rect draw_text(surface& dst, const SDL_Rect& area, int size,
return res;
}
SDL_Rect draw_text(CVideo* gui, const SDL_Rect& area, int size,
SDL_Rect draw_text(CVideo* /*gui*/, const SDL_Rect& area, int size,
const color_t& color, const std::string& txt,
int x, int y, bool use_tooltips, int style)
{
surface null_surf = surface(nullptr);
return draw_text(gui != nullptr ? gui->getSurface() : null_surf, area, size, color, txt, x, y, use_tooltips, style);
return draw_text(null_surf, area, size, color, txt, x, y, use_tooltips, style);
}
bool is_format_char(char c)

View file

@ -41,7 +41,6 @@ CVideo* CVideo::singleton_ = nullptr;
namespace
{
surface frameBuffer = nullptr;
bool fake_interactive = false;
}
@ -423,12 +422,6 @@ std::vector<point> CVideo::get_available_resolutions(const bool include_current)
return result;
}
// TODO: REMOVE ASAP
surface& CVideo::getSurface()
{
return frameBuffer;
}
point CVideo::current_resolution()
{
return point(window->get_size()); // Convert from plain SDL_Point

View file

@ -184,9 +184,6 @@ public:
/** Clear the screen contents */
void clear_screen();
/** Returns a reference to the framebuffer. */
surface& getSurface();
/**
* Stop the screen being redrawn. Anything that happens while the updates are locked will
* be hidden from the user's view.

View file

@ -240,8 +240,6 @@ void widget::bg_update()
void widget::bg_restore() const
{
clip_rect_setter clipper(video().getSurface(), &clip_rect_, clip_);
if (needs_restore_) {
needs_restore_ = false;
}
@ -249,7 +247,6 @@ void widget::bg_restore() const
void widget::bg_restore(const SDL_Rect& rect) const
{
clip_rect_setter clipper(video().getSurface(), &clip_rect_, clip_);
}
void widget::set_volatile(bool val)
@ -265,9 +262,6 @@ void widget::draw()
return;
bg_restore();
clip_rect_setter clipper(video().getSurface(), &clip_rect_, clip_);
draw_contents();
set_dirty(false);