[Commits] [wesnoth/wesnoth] 1bf922: SDL/Window: set render scaling method to linear

GitHub noreply at github.com
Mon Jul 31 01:50:53 UTC 2017


  Branch: refs/heads/accelerated_rendering
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 1bf922cb6d76cdee4d2dfd600453715921689614
      https://github.com/wesnoth/wesnoth/commit/1bf922cb6d76cdee4d2dfd600453715921689614
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/window.cpp

  Log Message:
  -----------
  SDL/Window: set render scaling method to linear

This looks better than NN scaling (default);


  Commit: 2cafa550b6254617d99b73cb24b42a0d8fd17bba
      https://github.com/wesnoth/wesnoth/commit/2cafa550b6254617d99b73cb24b42a0d8fd17bba
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/video.cpp

  Log Message:
  -----------
  Video: enabled accelerated rendering with texture target access


  Commit: 72d5b3eab645e2f29c2e16722a3016905c6e8a1e
      https://github.com/wesnoth/wesnoth/commit/72d5b3eab645e2f29c2e16722a3016905c6e8a1e
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M data/gui/widget/button_default.cfg
    M src/gui/core/canvas.cpp
    M src/gui/core/canvas.hpp
    M src/gui/core/canvas_private.hpp
    M src/gui/core/event/handler.cpp
    M src/gui/widgets/widget.cpp
    M src/gui/widgets/window.cpp

  Log Message:
  -----------
  GUI2/Canvas: refactor surface blitting out of drawing routines

This entirely refactors surface blitting out of the canvas. Instead, each canvas owns a texture. This texture
is completely redrawn any time the canvas if marked dirty, else the result is cached and drawn to the screen
each draw cycle.

All windows are now redrawn every draw cycle. The use of the cached canvas textures means there's no noticeable
performance difference (likely a performance gain, actually) from using surface blitting.

There's still some code to clean up and a few things to fix.


  Commit: a1a6d0fd21404ef2c0bc30df7a225b94b6d84dcf
      https://github.com/wesnoth/wesnoth/commit/a1a6d0fd21404ef2c0bc30df7a225b94b6d84dcf
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/window.cpp

  Log Message:
  -----------
  GUI2/Window: properly re-implement draw and restore code

We don't need all this dirty list or handling or surface restoration anymore.


  Commit: dc8c0ee66450817f54d261a5afa1bb18959fb83a
      https://github.com/wesnoth/wesnoth/commit/dc8c0ee66450817f54d261a5afa1bb18959fb83a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/event/handler.cpp
    M src/gui/dialogs/debug_clock.cpp
    M src/gui/dialogs/editor/custom_tod.cpp
    M src/gui/dialogs/lua_interpreter.cpp
    M src/gui/dialogs/outro.cpp
    M src/gui/dialogs/story_viewer.cpp
    M src/gui/dialogs/story_viewer.hpp
    M src/gui/dialogs/title_screen.cpp
    M src/gui/widgets/button.cpp
    M src/gui/widgets/container_base.cpp
    M src/gui/widgets/container_base.hpp
    M src/gui/widgets/generator.hpp
    M src/gui/widgets/generator_private.hpp
    M src/gui/widgets/grid.cpp
    M src/gui/widgets/grid.hpp
    M src/gui/widgets/label.cpp
    M src/gui/widgets/list.cpp
    M src/gui/widgets/listbox.cpp
    M src/gui/widgets/listbox.hpp
    M src/gui/widgets/matrix.cpp
    M src/gui/widgets/matrix.hpp
    M src/gui/widgets/menu_button.cpp
    M src/gui/widgets/minimap.hpp
    M src/gui/widgets/multimenu_button.cpp
    M src/gui/widgets/pane.cpp
    M src/gui/widgets/pane.hpp
    M src/gui/widgets/progress_bar.cpp
    M src/gui/widgets/repeating_button.cpp
    M src/gui/widgets/scrollbar.cpp
    M src/gui/widgets/scrollbar_container.cpp
    M src/gui/widgets/scrollbar_container.hpp
    M src/gui/widgets/slider.hpp
    M src/gui/widgets/styled_widget.cpp
    M src/gui/widgets/text_box.cpp
    M src/gui/widgets/text_box_base.cpp
    M src/gui/widgets/toggle_button.cpp
    M src/gui/widgets/toggle_panel.cpp
    M src/gui/widgets/tree_view.cpp
    M src/gui/widgets/tree_view.hpp
    M src/gui/widgets/tree_view_node.cpp
    M src/gui/widgets/tree_view_node.hpp
    M src/gui/widgets/viewport.cpp
    M src/gui/widgets/viewport.hpp
    M src/gui/widgets/widget.cpp
    M src/gui/widgets/widget.hpp
    M src/gui/widgets/window.hpp
    M src/scripting/lua_gui2.cpp

  Log Message:
  -----------
  GUI2: removed dirty widget interface

This is no longer needed since we redraw everything every frame. The dirty flag in the canvas remains
as that controls whether the cached texture is used or recreated.


  Commit: 63c23a8dd9d58e8bea57af88a7a5fd43b00eeba8
      https://github.com/wesnoth/wesnoth/commit/63c23a8dd9d58e8bea57af88a7a5fd43b00eeba8
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/window.cpp
    M src/gui/widgets/window.hpp

  Log Message:
  -----------
  GUI2/Window: removed restore flag and restorer surface


  Commit: a701b49c5975e24a0cc90cf5331a3b7eb79e9fae
      https://github.com/wesnoth/wesnoth/commit/a701b49c5975e24a0cc90cf5331a3b7eb79e9fae
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/gui/core/canvas.hpp
    M src/gui/widgets/panel.cpp
    M src/gui/widgets/styled_widget.cpp

  Log Message:
  -----------
  GUI2/Canvas: renamed blit function and removed surface argument


  Commit: e845dcb8d50f9f241e7efc2ad1d4f0db25d09aab
      https://github.com/wesnoth/wesnoth/commit/e845dcb8d50f9f241e7efc2ad1d4f0db25d09aab
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/container_base.cpp
    M src/gui/widgets/container_base.hpp
    M src/gui/widgets/generator.hpp
    M src/gui/widgets/generator_private.hpp
    M src/gui/widgets/grid.cpp
    M src/gui/widgets/grid.hpp
    M src/gui/widgets/matrix.cpp
    M src/gui/widgets/matrix.hpp
    M src/gui/widgets/minimap.cpp
    M src/gui/widgets/minimap.hpp
    M src/gui/widgets/multi_page.cpp
    M src/gui/widgets/multi_page.hpp
    M src/gui/widgets/pane.cpp
    M src/gui/widgets/pane.hpp
    M src/gui/widgets/panel.cpp
    M src/gui/widgets/panel.hpp
    M src/gui/widgets/scrollbar_container.cpp
    M src/gui/widgets/scrollbar_container.hpp
    M src/gui/widgets/spacer.cpp
    M src/gui/widgets/spacer.hpp
    M src/gui/widgets/styled_widget.cpp
    M src/gui/widgets/styled_widget.hpp
    M src/gui/widgets/toggle_panel.cpp
    M src/gui/widgets/toggle_panel.hpp
    M src/gui/widgets/tree_view_node.cpp
    M src/gui/widgets/tree_view_node.hpp
    M src/gui/widgets/viewport.cpp
    M src/gui/widgets/viewport.hpp
    M src/gui/widgets/widget.cpp
    M src/gui/widgets/widget.hpp
    M src/gui/widgets/window.cpp

  Log Message:
  -----------
  GUI2: removed framebuffer code from draw impl functions


  Commit: 46a7e52d624fc0d1e2a4fecbc876a48e82e51745
      https://github.com/wesnoth/wesnoth/commit/46a7e52d624fc0d1e2a4fecbc876a48e82e51745
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/font/text.cpp

  Log Message:
  -----------
  Hack to get text to render right


  Commit: fc7e6ee4daf80133d721c9c687136fbdf8e59cec
      https://github.com/wesnoth/wesnoth/commit/fc7e6ee4daf80133d721c9c687136fbdf8e59cec
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/gui/core/canvas.hpp
    M src/gui/widgets/panel.cpp
    M src/gui/widgets/styled_widget.cpp
    M src/gui/widgets/widget.cpp
    M src/gui/widgets/widget.hpp

  Log Message:
  -----------
  GUI2: refactored viewport setting and re-added clip rect setting

It turns out I had removed the clip rect setting in error; it prevented items in, say, a listbox from drawing
outside the widget's boundaries. I've re-added that now.

I've also moved viewport setting to the same place. It turns out it didn't need to be set every canvas draw.
The only reason the old code was passing the blitting rect to the canvas was it was needed for the sdl_blit call.
Since I can now set the viewport independent of a canvas state, there's no longer a need to set the viewport in
the canvas.


  Commit: f86b79839443b6d8d7ef2daa8e509c1a8dd3b61e
      https://github.com/wesnoth/wesnoth/commit/f86b79839443b6d8d7ef2daa8e509c1a8dd3b61e
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/event/handler.cpp
    M src/gui/dialogs/lua_interpreter.cpp

  Log Message:
  -----------
  Fixed some unused parameter warnings


  Commit: ec7b17cce2bc669a55fece00175ce8f4ec3d0654
      https://github.com/wesnoth/wesnoth/commit/ec7b17cce2bc669a55fece00175ce8f4ec3d0654
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/window.cpp

  Log Message:
  -----------
  Removed some debug output

[ci skip]


  Commit: b01967cdd27c98ef4132cf9aef42ec6926db327c
      https://github.com/wesnoth/wesnoth/commit/b01967cdd27c98ef4132cf9aef42ec6926db327c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/gui/widgets/widget.cpp
    M src/video.cpp

  Log Message:
  -----------
  Added some code to make my recent changes work with a software renderer


  Commit: 09895b73ba902eeeb63d4d05896471d3959eb8a7
      https://github.com/wesnoth/wesnoth/commit/09895b73ba902eeeb63d4d05896471d3959eb8a7
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/Canvas: removed surface_lock objects

The canvas surface isn't even passed to these functions anymore so I have no idea how this built.


  Commit: e3e6aded9ecc41af6c4c658c6177b767e2377958
      https://github.com/wesnoth/wesnoth/commit/e3e6aded9ecc41af6c4c658c6177b767e2377958
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/event/handler.cpp

  Log Message:
  -----------
  Small code simplification


  Commit: ccbad22d5f73102653a1862ab365920e9374649a
      https://github.com/wesnoth/wesnoth/commit/ccbad22d5f73102653a1862ab365920e9374649a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/Canvas: add error logging if canvas texture creation fails


  Commit: 606194e71fa7ebd4f8caebf7d3547aec57dfb1f0
      https://github.com/wesnoth/wesnoth/commit/606194e71fa7ebd4f8caebf7d3547aec57dfb1f0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M projectfiles/CodeBlocks/wesnoth.cbp
    M source_lists/libwesnoth_sdl
    M src/display.cpp
    M src/gui/core/canvas.cpp
    M src/gui/core/canvas.hpp
    M src/gui/core/event/handler.cpp
    M src/help/help.cpp
    A src/sdl/texture.cpp
    A src/sdl/texture.hpp
    M src/video.cpp
    M src/video.hpp

  Log Message:
  -----------
  Added SDL_Texture wrapper class and some utility functions


  Commit: 082a3580acfebfa5eae9559f487f0daccd7709e0
      https://github.com/wesnoth/wesnoth/commit/082a3580acfebfa5eae9559f487f0daccd7709e0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/minimap.cpp

  Log Message:
  -----------
  GUI2/Minimap: quick fix to get the minimap drawing again


  Commit: 73f7d59fba33f538262d33243ea5623434bbe951
      https://github.com/wesnoth/wesnoth/commit/73f7d59fba33f538262d33243ea5623434bbe951
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M projectfiles/CodeBlocks/wesnoth.cbp
    M src/gui/core/canvas.cpp
    A src/sdl/render_utils.hpp
    M src/sdl/texture.cpp
    M src/sdl/texture.hpp

  Log Message:
  -----------
  Moved renderer RAII helpers to their own file and added ones for clip rect and viewport


  Commit: 8474da395d75ffe7266b00ead84f7d4fa90cf049
      https://github.com/wesnoth/wesnoth/commit/8474da395d75ffe7266b00ead84f7d4fa90cf049
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/video.cpp

  Log Message:
  -----------
  CVideo: convert blit_surface to handle input as textures instead of blitting to framebuffer


  Commit: ab0f191b25afe400ea91a0e49d0b6cc72fddd956
      https://github.com/wesnoth/wesnoth/commit/ab0f191b25afe400ea91a0e49d0b6cc72fddd956
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/widget.cpp
    M src/sdl/rect.cpp

  Log Message:
  -----------
  Use get_renderer() over *get_window()

This doesn't appear to have been an issue in the rectangle drawing code at least, but it should guard
against possible segfaults in the future.


  Commit: a36f00f0b37c191f51841eeeefe3f1bdcdeda27b
      https://github.com/wesnoth/wesnoth/commit/a36f00f0b37c191f51841eeeefe3f1bdcdeda27b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/image.cpp
    M src/image.hpp

  Log Message:
  -----------
  Added a texture cache

Note this probably doesn't work properly yet since I haven't properly implemented shared management
of textures in their wrapper class.


  Commit: 9e4b7eb2a1b92761382ce027a79ff726826d7a26
      https://github.com/wesnoth/wesnoth/commit/9e4b7eb2a1b92761382ce027a79ff726826d7a26
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/texture.cpp
    M src/sdl/texture.hpp

  Log Message:
  -----------
  Texture: converted internal handling to use a shared_ptr

This allows multiple texture objects to refer to the same texture without destroying them prematurely.
This is different from the SDL_Surface wrapper's implementation since surfaces have their own internal
refcounting system; textures do not.


  Commit: 27a47cf21705d2f69fb6622d1435a2346cb6adac
      https://github.com/wesnoth/wesnoth/commit/27a47cf21705d2f69fb6622d1435a2346cb6adac
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/Canvas: disable surface manip w/ accelerated rendering for stretch resize mode

RenderCopy handles that automatically.


  Commit: 8fafddc9453d51a7522d861eae14e9f7c16dadcc
      https://github.com/wesnoth/wesnoth/commit/8fafddc9453d51a7522d861eae14e9f7c16dadcc
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/render_utils.hpp

  Log Message:
  -----------
  Fixed raii renderer rect setters

This fixes a problem that occurred if no previous set rect was available. In that case, both SDL_RenderGetClipRect
and SDL_RenderGetViewport returned empty rects and those were being set as the appropriate clip rects when the raii
object was destroyed.


  Commit: 0b24cfabbb320de8b06c7ace53e3f1f72aef98d9
      https://github.com/wesnoth/wesnoth/commit/0b24cfabbb320de8b06c7ace53e3f1f72aef98d9
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/sdl/utils.cpp
    M src/sdl/utils.hpp

  Log Message:
  -----------
  Enabled drawing of minimap in-game


  Commit: 8852ad956fae34dc951564453129be63ece81fb3
      https://github.com/wesnoth/wesnoth/commit/8852ad956fae34dc951564453129be63ece81fb3
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/controller_base.cpp
    M src/editor/controller/editor_controller.cpp
    M src/events.cpp
    M src/events.hpp
    M src/gui/core/event/handler.cpp
    M src/gui/widgets/window.cpp
    M src/wesnoth.cpp

  Log Message:
  -----------
  Moved GUI2's per-frame drawing trigger to global scope

This is derived from work originally done by @aginor (48bcb277d4). I cherry-picked that commit and made a few alterations.


  Commit: feabed2432ad10f4d9e498b51b293ea29162b6bb
      https://github.com/wesnoth/wesnoth/commit/feabed2432ad10f4d9e498b51b293ea29162b6bb
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/minimap.cpp

  Log Message:
  -----------
  GUI2/Miniap: draw any provided canvas data before the minimap


  Commit: fafe611a27465136465ba8e6955ca9b48483293c
      https://github.com/wesnoth/wesnoth/commit/fafe611a27465136465ba8e6955ca9b48483293c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M data/core/images/themes/classic/menubar.png
    A data/gui/window/game_ui.cfg
    M projectfiles/CodeBlocks/wesnoth.cbp
    M source_lists/wesnoth
    A src/gui/dialogs/game_ui.cpp
    A src/gui/dialogs/game_ui.hpp
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  Added static prototype for GUI2 in-game theme


  Commit: 932ea1eba5f966b2647af28b70a4a5c646ff2f85
      https://github.com/wesnoth/wesnoth/commit/932ea1eba5f966b2647af28b70a4a5c646ff2f85
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M projectfiles/CodeBlocks/wesnoth.cbp
    M source_lists/libwesnoth
    M src/arrow.cpp
    M src/arrow.hpp
    M src/display.cpp
    M src/display.hpp
    A src/drawing_buffer.cpp
    A src/drawing_buffer.hpp
    M src/editor/editor_display.cpp
    M src/game_display.cpp
    M src/units/animation.cpp
    M src/units/drawer.cpp
    M src/units/frame.cpp
    M src/whiteboard/attack.cpp
    M src/whiteboard/manager.cpp
    M src/whiteboard/move.cpp
    M src/whiteboard/recall.cpp
    M src/whiteboard/recruit.cpp
    M src/whiteboard/suppose_dead.cpp

  Log Message:
  -----------
  Decoupled drawing buffer code from display class


  Commit: 752508ece138833b5c8f9b45bca2e6b9a1819649
      https://github.com/wesnoth/wesnoth/commit/752508ece138833b5c8f9b45bca2e6b9a1819649
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/units/unit.cpp

  Log Message:
  -----------
  Unit: fixed hp and xp colors having 0 alpha


  Commit: c0e2945edd0d4fc7a7fa8349a1e60ee0f0661393
      https://github.com/wesnoth/wesnoth/commit/c0e2945edd0d4fc7a7fa8349a1e60ee0f0661393
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/editor/editor_display.cpp
    M src/gui/widgets/minimap.cpp
    M src/playsingle_controller.cpp
    M src/sdl/utils.cpp
    M src/units/drawer.cpp
    M src/units/drawer.hpp
    M src/units/frame.cpp
    M src/video.cpp
    M src/video.hpp
    M src/whiteboard/attack.cpp
    M src/whiteboard/suppose_dead.cpp

  Log Message:
  -----------
  Initial refactor for main-screen accelerated rendering


  Commit: c8f9c06dd5b6b8066888b21bc5c9ad6aa2216673
      https://github.com/wesnoth/wesnoth/commit/c8f9c06dd5b6b8066888b21bc5c9ad6aa2216673
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/event/handler.cpp

  Log Message:
  -----------
  GUI2: moved event handling into main context

Not sure why I need to call join() in connect() instead of the ctor, though.


  Commit: 94529dde839816c1e84b5a60f34a640cb77d15c9
      https://github.com/wesnoth/wesnoth/commit/94529dde839816c1e84b5a60f34a640cb77d15c9
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/units/drawer.cpp

  Log Message:
  -----------
  Draw units under bars/orbs/etc


  Commit: 73134bfcedf58b3e1a7eea8be76d4cbe061ce5c1
      https://github.com/wesnoth/wesnoth/commit/73134bfcedf58b3e1a7eea8be76d4cbe061ce5c1
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/video.cpp
    M src/video.hpp

  Log Message:
  -----------
  Video: expand render_copy to take flip arguments

Still needs to handle rotation.


  Commit: 6d9088498fd1d29460471ab1b8897cd222fe7330
      https://github.com/wesnoth/wesnoth/commit/6d9088498fd1d29460471ab1b8897cd222fe7330
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/Canvas: made use of CVideo::render_copy


  Commit: 2434110e3132e2e82d86a6ae1118330d74daca17
      https://github.com/wesnoth/wesnoth/commit/2434110e3132e2e82d86a6ae1118330d74daca17
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/play_controller.cpp

  Log Message:
  -----------
  Fixed play_controller not joining current event context

Was broken when I moved the GUI2 drawing trigger code to global scope probably.


  Commit: 448debf4c481ef1bb274913c5a9077391903e9a1
      https://github.com/wesnoth/wesnoth/commit/448debf4c481ef1bb274913c5a9077391903e9a1
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/units/drawer.cpp

  Log Message:
  -----------
  Uint: fixed bad bar alpha on unit mouseover


  Commit: 054b73f382e239b01b7a4beb3ed5f6ae8fe1e6a3
      https://github.com/wesnoth/wesnoth/commit/054b73f382e239b01b7a4beb3ed5f6ae8fe1e6a3
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/arrow.cpp
    M src/display.cpp
    M src/display.hpp
    M src/editor/editor_display.cpp
    M src/floating_label.cpp
    M src/floating_label.hpp
    M src/game_display.cpp
    M src/game_display.hpp
    M src/units/drawer.cpp
    M src/units/frame.cpp
    M src/units/udisplay.cpp
    M src/whiteboard/attack.cpp
    M src/whiteboard/suppose_dead.cpp

  Log Message:
  -----------
  Another huge chunk of progress


  Commit: 67934c37e937231d3e2c5ecd53add6d18eba3fdd
      https://github.com/wesnoth/wesnoth/commit/67934c37e937231d3e2c5ecd53add6d18eba3fdd
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/actions/advancement.cpp
    M src/actions/move.cpp
    M src/actions/undo.cpp
    M src/actions/unit_creator.cpp
    M src/controller_base.cpp
    M src/editor/action/action_item.cpp
    M src/editor/action/action_unit.cpp
    M src/menu_events.cpp
    M src/mouse_events.cpp
    M src/mouse_handler_base.cpp
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  Removed draw() calls into the display class

Not needed anymore since per-frame drawing is handled within said class.


  Commit: 24cbd762064fb3288e931557ed8fc83a131f3338
      https://github.com/wesnoth/wesnoth/commit/24cbd762064fb3288e931557ed8fc83a131f3338
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/events.cpp
    M src/video.cpp
    M src/video.hpp

  Log Message:
  -----------
  Video: (almost) completely removed framebuffer surface

Again, useless since there's no more window surface with accelerated rendering.
getSurface() remains since it's still used in quite a lot of places. Will removed ASAP.


  Commit: b252058527536122fb1452e6a3bffa8f84c8ba2c
      https://github.com/wesnoth/wesnoth/commit/b252058527536122fb1452e6a3bffa8f84c8ba2c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/tests/utils/fake_display.cpp
    M src/video.cpp
    M src/video.hpp

  Log Message:
  -----------
  Video: removed unused arguments from make_test_fake


  Commit: 3ef41dadf9da15cbf86a6899e4bdbc4f56bcd595
      https://github.com/wesnoth/wesnoth/commit/3ef41dadf9da15cbf86a6899e4bdbc4f56bcd595
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/game_display.cpp
    M src/units/drawer.cpp

  Log Message:
  -----------
  Got a bunch more components drawing

Reachmaps, attack indicators, shroud/fog (incomplete).


  Commit: 9f5832cdab6236419f189d6df507e3a51739e401
      https://github.com/wesnoth/wesnoth/commit/9f5832cdab6236419f189d6df507e3a51739e401
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Enabled more stuff drawing

Hex overlay, map items, fog/shroud transitions.


  Commit: e8c34be068a8a6853f834aebd3223611b352a482
      https://github.com/wesnoth/wesnoth/commit/e8c34be068a8a6853f834aebd3223611b352a482
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/controller_base.cpp
    M src/editor/controller/editor_controller.cpp
    M src/play_controller.cpp
    M src/playsingle_controller.cpp
    M src/replay_controller.cpp

  Log Message:
  -----------
  Removed most call to raise_draw_event

These don't seem necessary anymore since draw handling happens per-frame and doesn't rely
on calling derived class's draw() member.


  Commit: 871b77259d46f92747d336f1cb95d83cc75ed1ca
      https://github.com/wesnoth/wesnoth/commit/871b77259d46f92747d336f1cb95d83cc75ed1ca
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/units/drawer.cpp

  Log Message:
  -----------
  Units: fixed bad HP/XP bars fill rect offset


  Commit: 31f3910dd7205e0e90b44a3f9fbcd071aea3ca55
      https://github.com/wesnoth/wesnoth/commit/31f3910dd7205e0e90b44a3f9fbcd071aea3ca55
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/Canvas: fixed mirrored images being flipped on the wrong axis.


  Commit: 360f11cf53428191b2c80837ffc5d0f6aa0f1cb6
      https://github.com/wesnoth/wesnoth/commit/360f11cf53428191b2c80837ffc5d0f6aa0f1cb6
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Cleaned up the implementation of display::scroll()


  Commit: 8bb0caf4c41fdc6954f3034554409773dc878eed
      https://github.com/wesnoth/wesnoth/commit/8bb0caf4c41fdc6954f3034554409773dc878eed
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/actions/move.cpp

  Log Message:
  -----------
  Removed an unused variable

Not needed after I removed the draw() calls into the display class


  Commit: 27757e198d3ae3b90b65c3e9d2a2b785cedbdc16
      https://github.com/wesnoth/wesnoth/commit/27757e198d3ae3b90b65c3e9d2a2b785cedbdc16
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/image.cpp
    M src/image.hpp

  Log Message:
  -----------
  Extended implementation of the texture cache

Instead of always loading a surface at the same time, textures are now loaded directly from disk if applicable.
Instead, surfaces are only loaded if applicable to apply some effect that cannot as of now be done with texture
manipulation since we dont have shader support yet.

In that vein, I've also added two new texture caches, one for masked-to-hex images and one for ToD colored images.


  Commit: 829e4d2cd6e9c06877084bb065a7dc28b21f63ee
      https://github.com/wesnoth/wesnoth/commit/829e4d2cd6e9c06877084bb065a7dc28b21f63ee
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Trim ToD images to hex


  Commit: 2e4831691921326c53affd343e860d8cfe9590a0
      https://github.com/wesnoth/wesnoth/commit/2e4831691921326c53affd343e860d8cfe9590a0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Temporarily disable map label position update on map scroll

There are a bunch of problems with this I need to fix.


  Commit: a90bd36c43a9d59ae824f4b03f422a3125d47b0d
      https://github.com/wesnoth/wesnoth/commit/a90bd36c43a9d59ae824f4b03f422a3125d47b0d
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/gui/widgets/widget.cpp
    M src/video.cpp

  Log Message:
  -----------
  Removed software rendering fallback

I've decided to commit fully to accelerated rendering.


  Commit: 3403e4f7e5c95bcf1fa2b49c4d53ffc905725931
      https://github.com/wesnoth/wesnoth/commit/3403e4f7e5c95bcf1fa2b49c4d53ffc905725931
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/gui/core/canvas_private.hpp

  Log Message:
  -----------
  GUI2/Canvas: refactor surface use out of image rendering

The only real reason to keep using a surface was in order to have resize mode manipulations. I've now added
texture-only handling methods (the tiling one was borrowed from display.cpp's draw_background function).


  Commit: 0695ad96214995c012e022f98e14b1265acb8d7c
      https://github.com/wesnoth/wesnoth/commit/0695ad96214995c012e022f98e14b1265acb8d7c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M projectfiles/CodeBlocks/wesnoth.cbp
    M source_lists/libwesnoth_sdl
    M src/editor/editor_display.cpp
    M src/events.cpp
    M src/game_display.cpp
    A src/ogl/context.cpp
    A src/ogl/context.hpp
    A src/ogl/utils.cpp
    A src/ogl/utils.hpp
    M src/playsingle_controller.cpp
    M src/sdl/window.cpp
    M src/video.cpp
    M src/video.hpp

  Log Message:
  -----------
  Some initial code (disabled for now) for setting up an OGL context

In the interests of getting this all done faster, I've decided to postpone work on the OGL implementation for now
and focus on the SDL_Renderer version. This contains some basic code (include-guarded) for setting up an OGL context
for the main SDL window.


  Commit: 2e98b64d339485749bc51237442aa0b4570b6b0b
      https://github.com/wesnoth/wesnoth/commit/2e98b64d339485749bc51237442aa0b4570b6b0b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/image.cpp
    M src/image.hpp

  Log Message:
  -----------
  Allowed IPFs to work again when using the texture cache

See create_texture_from_sub_file doc comment for more info.


  Commit: b9182d6107cb5e157af2f9006a0b5870130e08e0
      https://github.com/wesnoth/wesnoth/commit/b9182d6107cb5e157af2f9006a0b5870130e08e0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/Canvas: set clip rect when tiling images

This fixes an issue where images could be tiled outside their desired size area.


  Commit: a04da715280a1b3c02a9727b64a0e23ebb040823
      https://github.com/wesnoth/wesnoth/commit/a04da715280a1b3c02a9727b64a0e23ebb040823
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M data/gui/widget/window_default.cfg

  Log Message:
  -----------
  GUI2/Window: draw background image first instead of last

Originally was going to do this as workaround for the background tiling over the borders,
but I fixed the root cause of that instead. Still, this just makes more sense.


  Commit: 58b0c274424edc86149731f65ad334feb8bce71f
      https://github.com/wesnoth/wesnoth/commit/58b0c274424edc86149731f65ad334feb8bce71f
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/dialogs/outro.cpp
    M src/gui/dialogs/story_viewer.cpp

  Log Message:
  -----------
  GUI2: removed some unnecessary calls to canvas::set_is_dirty

The one in Outro was unnecessary since set_variable already calls set_is_dirty.
The one in the Story Viewer was there to deal with some background redraw issues which no longer appear
with the new drawing methods.


  Commit: cc56977fcdc18fde872942918a5d24b887935a62
      https://github.com/wesnoth/wesnoth/commit/cc56977fcdc18fde872942918a5d24b887935a62
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/window.cpp
    M src/sdl/window.hpp

  Log Message:
  -----------
  SDL/Window: removed pixel format member and promoted renderer info wholly to class member

The pixel format member was really rather useless, since SDL_RenderInfo returns an array of supported
formats and only the first one was being saved.


  Commit: 422a33eff17ac51812a053307a7c857ac9bca18d
      https://github.com/wesnoth/wesnoth/commit/422a33eff17ac51812a053307a7c857ac9bca18d
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/render_utils.hpp
    M src/sdl/texture.cpp

  Log Message:
  -----------
  Added some inline wrappers for SDL_SetTexture* functions


  Commit: 545f34c8d4ab11c10519b8d275e04255b286658e
      https://github.com/wesnoth/wesnoth/commit/545f34c8d4ab11c10519b8d275e04255b286658e
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/game_display.cpp
    M src/halo.cpp
    M src/halo.hpp

  Log Message:
  -----------
  Refactored halo code to bring it in line with new drawing methods

This basically rips out all the unrendering and invalidation code. Neither is needed anymore.
Instead, we can have a simple, clean, "just draw the managed halos" interface.

Note there's an issue unrelated to this where halos aren't removed when a unit is killed with
the debug kill menu command.


  Commit: c398a0a23556ade33f1bd711b59f37b7c2ad899b
      https://github.com/wesnoth/wesnoth/commit/c398a0a23556ade33f1bd711b59f37b7c2ad899b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/units/animation.cpp
    M src/units/animation_component.cpp
    M src/units/drawer.cpp
    M src/units/frame.cpp

  Log Message:
  -----------
  Use shared_ptr::reset for clearing halo handlers


  Commit: e52f85e4235562b7a6382760960b090e356bf1c6
      https://github.com/wesnoth/wesnoth/commit/e52f85e4235562b7a6382760960b090e356bf1c6
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/units/frame.cpp

  Log Message:
  -----------
  Restored alpha handling of unit frames

Still need to figure out the blending effects or submerge alpha.


  Commit: d68d5070cf290295903c46e5ae21f7ed3679525b
      https://github.com/wesnoth/wesnoth/commit/d68d5070cf290295903c46e5ae21f7ed3679525b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/dialogs/editor/custom_tod.cpp
    M src/gui/dialogs/editor/custom_tod.hpp
    M src/gui/dialogs/modeless_dialog.cpp
    M src/gui/widgets/window.cpp
    M src/gui/widgets/window.hpp

  Log Message:
  -----------
  GUI2/Window: removed empty undraw() function

This was emptied earlier in my refactor when window unrendering was removed. I simply hadn't
removed the function yet.


  Commit: 7079ae13059efaed5ebe32aca6c1c080798e3900
      https://github.com/wesnoth/wesnoth/commit/7079ae13059efaed5ebe32aca6c1c080798e3900
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/image.cpp
    M src/image.hpp
    M src/sdl/render_utils.hpp
    M src/sdl/window.cpp

  Log Message:
  -----------
  Split texture caches into linear and NN scaled versions

With textures, you can't change render scale quality once they've been created. To rectify this, I've
made the texture caches a map of caches, sorted by scale quality. This should result in no performance
overhead, since an image is simply added to the appropriate quality cache on creation instead of in
a single cache. If a different version of a texture is needed it will be loaded later.

By default, load_texture will return images using nearest neighbor scaling. GUI2 always fetches images
using linear scaling. This is consistent with the old software rendering method. Plus, we don't have
any way (as of now) to specify the render quality on a per-image basis.


  Commit: af3fc82c8425c5fb2f834572394da99eb192732b
      https://github.com/wesnoth/wesnoth/commit/af3fc82c8425c5fb2f834572394da99eb192732b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/font/text.cpp
    M src/font/text.hpp
    M src/gui/core/canvas.cpp
    M src/gui/widgets/styled_widget.hpp

  Log Message:
  -----------
  Added a getter for a static pango_text object

The reason I added this was so I can refactor some temporary pango_text objects out of the display class.
styled_widget doesn't use this for reasons explained in the comment.


  Commit: 6647a7b0ecaf7467b4f07e67d0081959f269c0d1
      https://github.com/wesnoth/wesnoth/commit/6647a7b0ecaf7467b4f07e67d0081959f269c0d1
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    A data/gui/window/command_console.cfg
    M projectfiles/CodeBlocks/wesnoth.cbp
    M source_lists/wesnoth
    M src/controller_base.cpp
    A src/gui/dialogs/command_console.cpp
    A src/gui/dialogs/command_console.hpp
    M src/menu_events.cpp
    M src/menu_events.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp

  Log Message:
  -----------
  Port floating textbox/command console to GUI2

The old floating textbox was extremely entwined with the controller_base, play_controller, and menu_handler
classes. controller_base::have_keyboard_focus essentially controlled whether some events were executed based
on whether the floating textbox was open or not. Additionally, those events weren't even reached if a UI dialog
was open at all.

The new design features a singleton console class that can be called from anywhere, not just the game. I've also
decoupled the execution object from play_controller. The relevant functions in menu_handler are now passed to
the console as callbacks.

To work around map events such as clicking not being available if the console was open, I removed the exclusionary
is-in-dialog check from controller_base::handle_event and instead exit early out certain types of events using
controller_base::have_keyboard_focus. As mentioned in the accompanying comment, this isn't the best solution, but
it will do for now.

The new console also isn't fully feature-comparable with the old GUI1 one. The following are still missing:
* The checbox, for use when sending messages.
* Tab completion.
* A crash occurs when existing the app if a game was exited with the console open.

I'm leaving the old floating_textbox code around for now for reference.


  Commit: c6cd4caebfe7fcea44f74626db8ab8f0fb0a1750
      https://github.com/wesnoth/wesnoth/commit/c6cd4caebfe7fcea44f74626db8ab8f0fb0a1750
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/floating_label.cpp

  Log Message:
  -----------
  Floating Label: formatting update


  Commit: b35e925f32b019c4ee9ea468abe5262d2394e4e4
      https://github.com/wesnoth/wesnoth/commit/b35e925f32b019c4ee9ea468abe5262d2394e4e4
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/floating_label.cpp
    M src/floating_label.hpp
    M src/tooltips.cpp

  Log Message:
  -----------
  Refactored floating_label implementation

* Store label as a texture instead of creating a texture from a surface every draw cycle
* Restored expired label removal and alpha fadeout (was accidentally removed earlier in my refactoring)
* Use alpha field of bg_color member for background color
* Draw tooltip backgrounds procedurally instead of with surfaces and part of the label texture itself.
  See included comment for small caveat.


  Commit: 0d696947ab4221e559244ceb378cc9bf5a2c89b4
      https://github.com/wesnoth/wesnoth/commit/0d696947ab4221e559244ceb378cc9bf5a2c89b4
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Display: restrict render clip rect setter to map drawing scope only

This prevents tooltips from being cut off.


  Commit: 9524c37b3bd638e34b745fae8d3264a98c22bba8
      https://github.com/wesnoth/wesnoth/commit/9524c37b3bd638e34b745fae8d3264a98c22bba8
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/image.cpp

  Log Message:
  -----------
  Improved console output on IPF fail

Yes, I know the duplicate code should be consolidated.


  Commit: 6c1b1a71eb08c039bf07879c1b600e218520938a
      https://github.com/wesnoth/wesnoth/commit/6c1b1a71eb08c039bf07879c1b600e218520938a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/events.cpp
    M src/events.hpp
    M src/gui/core/event/handler.cpp
    M src/show_dialog.cpp
    M src/video.cpp
    M src/video.hpp
    M src/widgets/widget.cpp

  Log Message:
  -----------
  Refactor and cleanup of the drawing dispatch system

Previously, drawing was handled with custom DRAW and DRAW_ALL events which individual event handlers
managed. DRAW was used for only-as-needed draws, and DRAW_ALL for drawing everything. As we've switched
to accelerated rendering, we've switched to the latter model all the time; everything is always drawn.

Both DRAW and DRAW_ALL events aren't needed anymore and have been removed. Instead, we simply call each
handler's draw() function directly from events::pump. The two main cases that handled draw events - the
display class and GUI2 - just forwarded the event handler calls to their respective draw() functions anyway.

Awhile back to unconditionally send draw events to the event queue constantly every 20 ms. However, to prevent
draw calls from becoming backed up, the queue already had code to remove all but 1 draw event from the queue
anyway, so the actual rate of drawing was still reliant on the rate at which events::pump was called. Therefor
this commit should result in no change at the rate the screen is drawn.


  Commit: 87fe9a8015f3439b939b2b447d997b3ebfcc22b6
      https://github.com/wesnoth/wesnoth/commit/87fe9a8015f3439b939b2b447d997b3ebfcc22b6
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M projectfiles/CodeBlocks/wesnoth.cbp
    M source_lists/libwesnoth
    M src/arrow.cpp
    M src/arrow.hpp
    M src/display.cpp
    M src/display.hpp
    R src/drawing_buffer.cpp
    R src/drawing_buffer.hpp
    A src/drawing_queue.cpp
    A src/drawing_queue.hpp
    M src/editor/editor_display.cpp
    M src/game_display.cpp
    M src/units/animation.cpp
    M src/units/drawer.cpp
    M src/units/frame.cpp
    M src/units/frame.hpp
    M src/whiteboard/attack.cpp
    M src/whiteboard/manager.cpp
    M src/whiteboard/move.cpp
    M src/whiteboard/recall.cpp
    M src/whiteboard/recruit.cpp
    M src/whiteboard/suppose_dead.cpp

  Log Message:
  -----------
  Renamed drawing_buffer to drawing_queue

Also renamed drawing_queue::drawing_layer to just 'layer'.


  Commit: 1ebee45101e0a4c1357073daa32baf0134db4965
      https://github.com/wesnoth/wesnoth/commit/1ebee45101e0a4c1357073daa32baf0134db4965
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Fixed halos drawing over fog and shroud (fixes #1406)


  Commit: a9cc7ffc7d26a4e45b2394716a9f3f611fbfe435
      https://github.com/wesnoth/wesnoth/commit/a9cc7ffc7d26a4e45b2394716a9f3f611fbfe435
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Restore map label position anchoring

Also optimized the scroll() function a little to exit early if no change would occur.


  Commit: 2f778219f6b21ebab1da4d33968e0ddba444952b
      https://github.com/wesnoth/wesnoth/commit/2f778219f6b21ebab1da4d33968e0ddba444952b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/window.cpp

  Log Message:
  -----------
  SDL/Window: throw exception if render-to-texture is not enabled

NOTE: for some reason, if I remove the `SDL_RENDERER_TARGETTEXTURE` flag from sdl::window's ctor
render_flags argument, this assertion still doesn't throw. Not sure if that means by GPU supports
it by default, or what.


  Commit: 10b12b1fd0bfa3ae7d7bcecaadb9f5e2e4b52f96
      https://github.com/wesnoth/wesnoth/commit/10b12b1fd0bfa3ae7d7bcecaadb9f5e2e4b52f96
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/actions/advancement.cpp
    M src/actions/attack.cpp
    M src/actions/create.cpp
    M src/actions/move.cpp
    M src/actions/undo_recall_action.cpp
    M src/actions/undo_recruit_action.cpp
    M src/actions/unit_creator.cpp
    M src/actions/vision.cpp
    M src/arrow.cpp
    M src/arrow.hpp
    M src/display.cpp
    M src/display.hpp
    M src/editor/action/mouse/mouse_action_item.cpp
    M src/editor/action/mouse/mouse_action_unit.cpp
    M src/editor/controller/editor_controller.cpp
    M src/editor/editor_display.cpp
    M src/editor/map/context_manager.cpp
    M src/fake_unit_manager.cpp
    M src/floating_textbox.cpp
    M src/game_display.cpp
    M src/game_display.hpp
    M src/gui/dialogs/editor/custom_tod.cpp
    M src/menu_events.cpp
    M src/play_controller.cpp
    M src/playsingle_controller.cpp
    M src/replay_controller.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/synced_commands.cpp
    M src/units/animation.cpp
    M src/units/udisplay.cpp
    M src/whiteboard/attack.cpp
    M src/whiteboard/attack.hpp
    M src/whiteboard/manager.cpp
    M src/whiteboard/move.cpp
    M src/whiteboard/recall.cpp
    M src/whiteboard/recall.hpp
    M src/whiteboard/recruit.cpp
    M src/whiteboard/recruit.hpp
    M src/whiteboard/side_actions.cpp
    M src/whiteboard/suppose_dead.cpp
    M src/whiteboard/suppose_dead.hpp
    M src/whiteboard/utility.cpp

  Log Message:
  -----------
  Display: removed all the invalidated locations code

This removes all the code related to invalidating locations, any functions used to set, modify, or propagate
location invalidation, and several functions that no longer serve any purpose anymore since their only purpose
was to handle invalidated locations.


  Commit: 02c0ea2659d79f1bce8d6def8f9b6493a034ce06
      https://github.com/wesnoth/wesnoth/commit/02c0ea2659d79f1bce8d6def8f9b6493a034ce06
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/actions/move.cpp
    M src/display.cpp
    M src/units/animation.cpp
    M src/units/animation.hpp
    M src/units/animation_component.cpp
    M src/units/animation_component.hpp
    M src/whiteboard/manager.cpp

  Log Message:
  -----------
  Removed animation invalidation code

This no longer actually does anything now that location invalidation is removed. If you follow the code
animation_component::invalidate called unit_animation::invalidate which was responsible for generating
the overlaped_hex_ set. Previously, this is what locations were invalidated. Now it didn't do anything.


  Commit: 9eafd4b52054f8e004ad0aa3ae642944bad06482
      https://github.com/wesnoth/wesnoth/commit/9eafd4b52054f8e004ad0aa3ae642944bad06482
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/actions/attack.cpp
    M src/actions/vision.cpp
    M src/display.cpp
    M src/display.hpp
    M src/editor/controller/editor_controller.cpp
    M src/editor/map/context_manager.cpp
    M src/gui/dialogs/editor/custom_tod.cpp
    M src/play_controller.cpp
    M src/replay_controller.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/units/udisplay.cpp

  Log Message:
  -----------
  Display: removed old drawing code and external draw calls


  Commit: 2fae720ace9fa648f735605328792269d15c0ecf
      https://github.com/wesnoth/wesnoth/commit/2fae720ace9fa648f735605328792269d15c0ecf
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/units/drawer.cpp
    M src/units/frame.cpp

  Log Message:
  -----------
  Fixed some bad drawing offsets and sizes when zoomed in

This fixes HP/XP bar size (wasn't scaled to zoom) and placement, as well as crown/orb and main sprite placement.


  Commit: 23ba4c76059d550394c2a5d47025780b7b798dbe
      https://github.com/wesnoth/wesnoth/commit/23ba4c76059d550394c2a5d47025780b7b798dbe
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/texture.cpp
    M src/sdl/texture.hpp

  Log Message:
  -----------
  SDL/Texture: made info struct take a texture ptr directly

Will allow me to construct one directly from a pointer if I don't have a wrapper object.


  Commit: a58d939afdfdae13b7159f8f691e4fbc33f59177
      https://github.com/wesnoth/wesnoth/commit/a58d939afdfdae13b7159f8f691e4fbc33f59177
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/editor/editor_display.cpp
    M src/editor/editor_display.hpp
    M src/game_display.cpp
    M src/game_display.hpp

  Log Message:
  -----------
  Display: work on refactoring the main drawing system

Previously, every visible hex was iterated over and every element in that hex draw. This was inefficient
for two reasons: First, it meant the performance footprint for many operations like unit drawing was O(n²),
since the list of elements had to be checked for every single hex. Second, it meant the renderer had to
switch active textures many more times than necessary.

My new system involved drawing every element of a specific type at once - ie, all background terrains at
once, all units, all items, etc. This reduces lookup time from O(n²) to O(n) and results in a noticeable
performance increase. It also reduces the number of times the renderer needs to switch active textures,
since bulk draws such as the map grid overlay are now done all at once while that specific texture is
active.

There are still some layering issues and missing elements that need to be sorted, especially in game_display.


  Commit: 5926731b7ee8b0e21bc08fe44e9cba4f536b441a
      https://github.com/wesnoth/wesnoth/commit/5926731b7ee8b0e21bc08fe44e9cba4f536b441a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/video.cpp

  Log Message:
  -----------
  Video: don't render null textures


  Commit: ee0c1e08493ed398755c9ff36eb68bd67aaeb6fb
      https://github.com/wesnoth/wesnoth/commit/ee0c1e08493ed398755c9ff36eb68bd67aaeb6fb
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/editor/controller/editor_controller.cpp
    M src/menu_events.cpp
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/playturn.cpp
    M src/replay_controller.cpp
    M src/synced_commands.cpp
    M src/video.cpp

  Log Message:
  -----------
  Removed external calls to display::redraw_everything()


  Commit: aafbe12ff937eabec8c5580d5fd2e60a2dd599db
      https://github.com/wesnoth/wesnoth/commit/aafbe12ff937eabec8c5580d5fd2e60a2dd599db
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/actions/advancement.cpp
    M src/formula/debugger.cpp
    M src/game_events/action_wml.cpp
    M src/game_events/pump.cpp
    M src/playturn.cpp
    M src/replay.cpp
    M src/synced_user_choice.cpp
    M src/whiteboard/manager.cpp

  Log Message:
  -----------
  Use CVideo singleton instead of resources::screen->video()


  Commit: e3400bb19e5aa7619987d57a9cc8690a2705677b
      https://github.com/wesnoth/wesnoth/commit/e3400bb19e5aa7619987d57a9cc8690a2705677b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/help/help.cpp

  Log Message:
  -----------
  Quick fix for crash when opening help browser

The thing still isn't drawing but this at least fixes the crash.


  Commit: 0672c15602dd6fcf353504f48e5e950f8fb6bdd5
      https://github.com/wesnoth/wesnoth/commit/0672c15602dd6fcf353504f48e5e950f8fb6bdd5
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp

  Log Message:
  -----------
  Display: header formatting and doc updates

Appropriate functions were also marked deprecated.


  Commit: dab92082be4b74ab02626d1fd23214db8a9b85fe
      https://github.com/wesnoth/wesnoth/commit/dab92082be4b74ab02626d1fd23214db8a9b85fe
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.hpp
    M src/gui/core/event/handler.cpp

  Log Message:
  -----------
  Marked sdl_handler::draw overrides as final


  Commit: e2cebab6950febec663bb60cc0c1b58ca0c57623
      https://github.com/wesnoth/wesnoth/commit/e2cebab6950febec663bb60cc0c1b58ca0c57623
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/game_display.cpp
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/replay_controller.cpp

  Log Message:
  -----------
  Display: cleaned up a bunch of now-unused/unnecessary members and functions


  Commit: 7f6948070f6ac88cc2b2fbd3fd1e73ae968905d0
      https://github.com/wesnoth/wesnoth/commit/7f6948070f6ac88cc2b2fbd3fd1e73ae968905d0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Display: re-enable fps counter with :fps


  Commit: ac838c197ee958609df87eb2f9a5881e74e29fc7
      https://github.com/wesnoth/wesnoth/commit/ac838c197ee958609df87eb2f9a5881e74e29fc7
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/Canvas: don't skip drawing if canvas texture is null


  Commit: 56dc4814fc8e887f869efd463e05bca45ea3eb1b
      https://github.com/wesnoth/wesnoth/commit/56dc4814fc8e887f869efd463e05bca45ea3eb1b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/floating_label.cpp
    M src/font/text.cpp
    M src/font/text.hpp
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  Added a texture cache for pango_text render output


  Commit: e0dc0688835f693e67f75088c4a7d9a0b0b6bd9d
      https://github.com/wesnoth/wesnoth/commit/e0dc0688835f693e67f75088c4a7d9a0b0b6bd9d
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/floating_label.cpp
    M src/floating_label.hpp

  Log Message:
  -----------
  Floating Label: header formatting updates


  Commit: 7b735f74b307ffbbd6b279878beb95c46c9c128b
      https://github.com/wesnoth/wesnoth/commit/7b735f74b307ffbbd6b279878beb95c46c9c128b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/font/text.cpp
    M src/sdl/utils.cpp

  Log Message:
  -----------
  Use pixel format enums for creating surfaces instead color mask values

This bumps the min SDL version to 2.0.5, but it's a lot easier to read.


  Commit: 07ebbce87742eb82ada19ef344699806fb11e8f8
      https://github.com/wesnoth/wesnoth/commit/07ebbce87742eb82ada19ef344699806fb11e8f8
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/Canvas: handle text alpha as a render-time op

This reduces the number of times the text itself needs to be rendered, especially for areas like the
story viewer where the only difference is alpha.


  Commit: a325a9270a8c62d39b3e6c5ac3c30fc077815a2f
      https://github.com/wesnoth/wesnoth/commit/a325a9270a8c62d39b3e6c5ac3c30fc077815a2f
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/font/text.cpp
    M src/font/text.hpp

  Log Message:
  -----------
  Font/Pango Text: added option for text outline

This removes the need to create outlines with surface blitting as the floating_label impl does.
Note the outline is slightly cut off on the sides. Need to adjust geometry to account for it later.


  Commit: 9210a4cc43092375bd6004509d97ceeb19dd1518
      https://github.com/wesnoth/wesnoth/commit/9210a4cc43092375bd6004509d97ceeb19dd1518
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/font/text.cpp
    M src/font/text.hpp

  Log Message:
  -----------
  Font/Pango Text: minor cleanup


  Commit: 6062b6c9462850d6c3b15ffe3e341e295c877490
      https://github.com/wesnoth/wesnoth/commit/6062b6c9462850d6c3b15ffe3e341e295c877490
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/texture.cpp
    M src/sdl/texture.hpp

  Log Message:
  -----------
  Some updates to the texture wrapper class

* Made reset() a public function
* Added an assign() function
* Don't try to destroy null textures
* Updated doc comments

I left assign() as just taking an SDL_Texture ptr since having it take a texture ref would be
functionally equivalent to operator=.


  Commit: 13995cea1dd2b66397a83d10fa91ff95c558734b
      https://github.com/wesnoth/wesnoth/commit/13995cea1dd2b66397a83d10fa91ff95c558734b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/image.cpp

  Log Message:
  -----------
  Avoid temporary object when creating new textures from disk


  Commit: 8ce19e06839ff2c38291e99f3fe35f6dd597af79
      https://github.com/wesnoth/wesnoth/commit/8ce19e06839ff2c38291e99f3fe35f6dd597af79
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/floating_label.cpp

  Log Message:
  -----------
  Floating Labels: use new pango_text functionality for generating text outline


  Commit: 3163acbff0b7a6a3839090cb0f3f33fcc26dc2d6
      https://github.com/wesnoth/wesnoth/commit/3163acbff0b7a6a3839090cb0f3f33fcc26dc2d6
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp

  Log Message:
  -----------
  Display: avoid unnecessarily (potentially) creating millions of temp vectors

I've moved the terrain hex drawing code directly into draw_visible_hexes instead of relying on get_terrain_images
to return a vector of all the necessary images for each visible hex and then drawing them. Instead, we now draw
each hex's images immediately without any intermediary container.

With the old method, after about 10 to 15 seconds of drawing we had already allocated (and destroyed) almost 180,000
temporary vectors (a new one was created for each hex, twice per draw cycle). It's obvious how quickly that would add
up over a normal play session, and though in this case the performance hit for creating each vector was probably tiny,
creating them likely would have added up.


  Commit: 5ee90c8abae34a77710bec51608aaf56ebba44ce
      https://github.com/wesnoth/wesnoth/commit/5ee90c8abae34a77710bec51608aaf56ebba44ce
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/actions/vision.cpp

  Log Message:
  -----------
  Comment out an unused parameter

Not sure if we'll need this again (perhaps to delay draws mid-action) so I'm not removing it yet.


  Commit: 84edaa5905352748f667a8b829b756f7d8af88e3
      https://github.com/wesnoth/wesnoth/commit/84edaa5905352748f667a8b829b756f7d8af88e3
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/floating_label.cpp
    M src/floating_label.hpp

  Log Message:
  -----------
  Added RAII helper struct to manage a floating label's lifetime


  Commit: d758639e61b5d2e33b8930b8f49ff57090eb7c88
      https://github.com/wesnoth/wesnoth/commit/d758639e61b5d2e33b8930b8f49ff57090eb7c88
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/game_display.cpp
    M src/game_display.hpp
    M src/whiteboard/manager.cpp
    M src/whiteboard/move.cpp
    M src/whiteboard/recall.cpp
    M src/whiteboard/recruit.cpp

  Log Message:
  -----------
  Another large batch of progress, primarily in game_display

This is primarily focused on getting various areas of the game display drawing, such as footstep images
and the terrain defense indicators.

To facilitate the last, I've refactored draw_text_in_hex to utilize floating labels instead of drawing
to hex directly with surfaces. This probably isn't the most optimal solution, since labels are continuously
created and destroyed, but since their text is usually short and cached in the rendered text cache it
does for now.

Also includes some cleanup of deprecated functions in display, and slight reordering of drawing order of
certain elements.


  Commit: 7b5e073f1a3ff531afff645cfcd416bce6607dfe
      https://github.com/wesnoth/wesnoth/commit/7b5e073f1a3ff531afff645cfcd416bce6607dfe
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Display: simplified a few things


  Commit: 8efba123fede399e44f2d2f6ba5c54c29e8ecb0e
      https://github.com/wesnoth/wesnoth/commit/8efba123fede399e44f2d2f6ba5c54c29e8ecb0e
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/texture.cpp

  Log Message:
  -----------
  SDL/Texture: avoid unnecessary shared_ptr creation

Made use of shared_ptr::reset instead of creating temp shared_ptrs, assigning them to the class ptr,
then deleting them.


  Commit: c7443ac81309180323cac21af081a741371e5d75
      https://github.com/wesnoth/wesnoth/commit/c7443ac81309180323cac21af081a741371e5d75
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Display: fixed moving units drawing under foreground terrains


  Commit: 9a689dcd8a847957931ce83cbcee60c218484186
      https://github.com/wesnoth/wesnoth/commit/9a689dcd8a847957931ce83cbcee60c218484186
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/floating_label.cpp

  Log Message:
  -----------
  Floating Label: keep local pango_text object static

This also means I need to set set_add_outline every time create_texture is called to make sure the
text renderer has the correct settings.


  Commit: 609ed21c0c96afcf9e842ebda70b781e67cda532
      https://github.com/wesnoth/wesnoth/commit/609ed21c0c96afcf9e842ebda70b781e67cda532
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/controller_base.cpp
    M src/controller_base.hpp

  Log Message:
  -----------
  Controller Base: removed unused process_focus_keydown_event event

This was used before the command console was converted to GUI2.


  Commit: a91a30beb5cf9feece17313d97df1625cb9ff690
      https://github.com/wesnoth/wesnoth/commit/a91a30beb5cf9feece17313d97df1625cb9ff690
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/controller_base.cpp
    M src/display.cpp
    M src/display.hpp
    M src/events.cpp
    M src/floating_label.cpp
    M src/gui/dialogs/lobby/lobby.cpp
    M src/gui/widgets/window.cpp
    M src/help/help.cpp
    M src/help/help_topic_generators.cpp
    M src/show_dialog.cpp
    M src/tooltips.cpp
    M src/video.cpp
    M src/video.hpp
    M src/widgets/button.cpp
    M src/widgets/menu.cpp
    M src/widgets/textbox.cpp

  Log Message:
  -----------
  Refactored handling of window/renderer size getters

* Removed display::screen_area(), display::w(), and display::h().
* Moved the global screen_area() function into the CVideo class.
* Renamed CVideo::getx() and gety() to get_width() and get_height()
* Made those two functions return the result of screen_area() instead of the other way around.
* Added preliminary support for high-DPI rendering to screen_area()

Note on the last point: When I fixed bug #1772 (aa8f6c7e7 right now but will probably change with rebasing)
I noted that SDL_GetWindowSize and SDL_GetRendererOutputSize returned the same results for me (even with
Window's automatic scaling for non-high-DPI-enabled apps disabled) but that the SDL documentation stated the
former returned screen coordinates and the latter pixels. In that same commit I changed the dimension functions
to use SDL_GetWindowSize. I've now reversed that decision and gone back to using SDL_GetRendererOutputSize so
I can guarantee output in pixels. If use_pixels is false, the code will return coordinates in 96 DPI, so I need
to have pixel measurements for the calculations.

Again, though, I do not know if SDL_GetWindowSize returns a different value that pixel size (which it's said
to do) on macOS or iOS. I'll need to do some testing. It's possible on those platforms I won't need the 96 DPI
measurements, but it's also possible it will be needed on on platforms, since all of our code relies on pixel
measurements.


  Commit: 644b35db314aa03e17c3d08fc933343da7f722ee
      https://github.com/wesnoth/wesnoth/commit/644b35db314aa03e17c3d08fc933343da7f722ee
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/font/text.cpp

  Log Message:
  -----------
  Font/Pango Text: fixed a weird crash in Cairo

See added comment for details.


  Commit: 5200a92ffe880dfd7a814266a5aabc1451f0763b
      https://github.com/wesnoth/wesnoth/commit/5200a92ffe880dfd7a814266a5aabc1451f0763b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.hpp

  Log Message:
  -----------
  Display: exit render_scaled_to_zoom early if passed texture is null


  Commit: e285ea16e289b6996b9947ad43828b7202e91931
      https://github.com/wesnoth/wesnoth/commit/e285ea16e289b6996b9947ad43828b7202e91931
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp

  Log Message:
  -----------
  Display: avoid temp vectors when rendering partial fog/shround images on hex


  Commit: ee69744b74a745cfdc76373cb3e01bd3a546b086
      https://github.com/wesnoth/wesnoth/commit/ee69744b74a745cfdc76373cb3e01bd3a546b086
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/halo.cpp

  Log Message:
  -----------
  Halos: fixed incorrect drawing origin when at non-default zoom


  Commit: 87306c1f428495db2fc9cb537bd91ac65ab807a3
      https://github.com/wesnoth/wesnoth/commit/87306c1f428495db2fc9cb537bd91ac65ab807a3
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/sdl/render_utils.hpp
    M src/sdl/window.cpp

  Log Message:
  -----------
  Moved SDL_SetRenderDrawColor wrapper to utils file and added a second overload

Also renamed the function to a more colloquial version.


  Commit: 72110963074da7ab618b2cb859e3cbaa08054b4b
      https://github.com/wesnoth/wesnoth/commit/72110963074da7ab618b2cb859e3cbaa08054b4b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/gui/core/canvas.hpp

  Log Message:
  -----------
  GUI2/Canvas: optimized cached texture management

Instead of throwing out the cached texture every time the canvas was dirty, I've added a flag so that
only happens if its size has actually changed. There still seem to be some issues in GUI2 where canvas
objects keep getting reset, but I'm not sure why. Will have to look into that.

Anyway, the addition of the SDL_RenderClear call also seems to have fixed the weird graphics bleed-through
I was getting when running the game with the OGL driver.

I don't know if the canvas copy or move ctors are needed for anything. I added them for a test, but I'll
leave them for now in case I need them later.


  Commit: f0afac14bc6e42e66c1a7d8f0180798d799bd914
      https://github.com/wesnoth/wesnoth/commit/f0afac14bc6e42e66c1a7d8f0180798d799bd914
  Author: Sofartin <hrubymar10 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj

  Log Message:
  -----------
  Updated Xcode project for macOS targets


  Commit: 4a875a646e7f6ad4d84d56d5c74200a346fd73c8
      https://github.com/wesnoth/wesnoth/commit/4a875a646e7f6ad4d84d56d5c74200a346fd73c8
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M projectfiles/VC12/wesnoth.vcxproj
    M projectfiles/VC12/wesnoth.vcxproj.filters
    M src/gui/core/canvas.cpp
    M src/gui/core/canvas.hpp
    M src/sdl/texture.cpp
    M src/sdl/texture.hpp

  Log Message:
  -----------
  Fix build with Visual Studio


  Commit: ab17b3417c46e68e57ec91d8321843d4bcc03449
      https://github.com/wesnoth/wesnoth/commit/ab17b3417c46e68e57ec91d8321843d4bcc03449
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/sdl/render_utils.hpp

  Log Message:
  -----------
  Allow render_target_setter to restore the last target when destroyed


  Commit: a612df177969730abb45f5c269b0c226d8e4d241
      https://github.com/wesnoth/wesnoth/commit/a612df177969730abb45f5c269b0c226d8e4d241
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/minimap.cpp
    M src/minimap.hpp

  Log Message:
  -----------
  Added new minimap drawing method that works wholly with textures

I've left the old getMinimap function alone and added a new function that will eventually replace it
that utilizes texture rendering to a given texture instead of relying on surface blits and scaling.
This has the benefit of, well, reducing surface ops, for one, as well as removing the need to create
a new texture from the minimap surface every time it's updated.


  Commit: ea6b106800fc82b485b46bdeee13dd6f8847b6bf
      https://github.com/wesnoth/wesnoth/commit/ea6b106800fc82b485b46bdeee13dd6f8847b6bf
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp
    M src/gui/core/canvas.hpp

  Log Message:
  -----------
  GUI2/Canvas: allow the default draw routine (shape drawing) to be overridden

Previously widgets that wanted to implement custom drawing behavior overrode styled_widget::impl_draw_background
or impl_draw_foreground. Those functions in the base class simply called the canvas render methods. Some widgets
such as the minimap ignored that rendered the contents on their own.

This new method allows rendering directly to the canvas's texture, meaning all the caching and sizing is already
handled by the canvas and doesn't need to be done by the widget; everything's always the right size and redrawn
when necessary.


  Commit: 23e4a59993e0db728985ed3242c9a3ed926d5d17
      https://github.com/wesnoth/wesnoth/commit/23e4a59993e0db728985ed3242c9a3ed926d5d17
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/core/canvas.cpp

  Log Message:
  -----------
  GUI2/CanvasL fixup 4ed729cf9c (use initializer list for move ctor)


  Commit: b590837b02eb3b04d339f90120668298cd1fa615
      https://github.com/wesnoth/wesnoth/commit/b590837b02eb3b04d339f90120668298cd1fa615
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/minimap.cpp
    M src/gui/widgets/minimap.hpp

  Log Message:
  -----------
  GUI2/Minimap: refactored drawing code

Instead of using the minimap surface method (which was getting converted from surface to texture every
draw cycle since the caching mechanism the canvas implemented wasn't available and the weird custom
cache the widget implemented itself didn't seem to do actually do anything) we use the new render-to-
canvas-texture method which is a lot cleaner and should be a lot faster. This also means we no longer
override styled_widget::impl_draw_background.

Do note I might use the design of the removed cache here to add some age functionality to the
font::pango_text cache.


  Commit: a9081b3a04a916ca35df94af6ec6fc58300e1990
      https://github.com/wesnoth/wesnoth/commit/a9081b3a04a916ca35df94af6ec6fc58300e1990
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/minimap.cpp

  Log Message:
  -----------
  GUI2/Minimap: fixed a few issues with the new drawing impl

First, the gamemap ptr wasn't reset if map creation failed, meaning the last data set was drawn instead.
Secondly, if no valid map data was provided before the canvas_draw_background function was called, you'd
get a nullptr dereference.

This fix also means invalid maps aren't drawn in the Load Game dialog as before, since the canvas will
clear the texture before calling canvas_draw_background, which will now do nothing if map_ is null.


  Commit: e67de4b75df13edcd9503d4886f9a5616b32b1e2
      https://github.com/wesnoth/wesnoth/commit/e67de4b75df13edcd9503d4886f9a5616b32b1e2
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/widgets/window.cpp
    M src/gui/widgets/window.hpp

  Log Message:
  -----------
  GUI2/Window: removed now-unused members

Neither of these are necessary with the accelerated rendering drawing refactor of GUI2.


  Commit: be0c0c296ea9a01e1039201dc81f45a1be8a8195
      https://github.com/wesnoth/wesnoth/commit/be0c0c296ea9a01e1039201dc81f45a1be8a8195
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-31 (Mon, 31 Jul 2017)

  Changed paths:
    M src/gui/dialogs/command_console.cpp
    M src/gui/dialogs/command_console.hpp

  Log Message:
  -----------
  GUI2/Command Console: small cleanup/fixup

* Ensured display() only executes if the singleton is null. That ensures there's no way a console can be
  overridden while one is open.
* Removed the manual call to hide(). The modeless_dialog dtor handled calling that already.


Compare: https://github.com/wesnoth/wesnoth/compare/7258752003fe...be0c0c296ea9


More information about the Commits mailing list