mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-15 20:11:31 +00:00
text renderer: eliminate local variable
This commit is contained in:
parent
83366fa9b8
commit
ac1c82cd89
|
@ -711,9 +711,7 @@ static void from_cairo_format(uint32_t & c)
|
||||||
|
|
||||||
void pango_text::render(PangoLayout& layout, const SDL_Rect& viewport)
|
void pango_text::render(PangoLayout& layout, const SDL_Rect& viewport)
|
||||||
{
|
{
|
||||||
uint8_t* buffer = &surface_buffer_[0];
|
auto cairo_surface = cairo::create_surface(&surface_buffer_[0], point{ viewport.w, viewport.h }); // TODO: use rect::size
|
||||||
|
|
||||||
auto cairo_surface = cairo::create_surface(buffer, point{ viewport.w, viewport.h }); // TODO: use rect::size
|
|
||||||
auto cairo_context = cairo::create_context(cairo_surface);
|
auto cairo_context = cairo::create_context(cairo_surface);
|
||||||
|
|
||||||
// Convenience pointer
|
// Convenience pointer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user