[Commits] [wesnoth/wesnoth] 135e8f: SDL/Window: set render scaling method to linear

GitHub noreply at github.com
Sat Jun 3 04:42:15 UTC 2017


  Branch: refs/heads/accelerated_rendering
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 135e8f82cd624156ac77ccc8841b96dcd005f988
      https://github.com/wesnoth/wesnoth/commit/135e8f82cd624156ac77ccc8841b96dcd005f988
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: dfc59c9e4fa3e51e7130829d061973bb7208d1d2
      https://github.com/wesnoth/wesnoth/commit/dfc59c9e4fa3e51e7130829d061973bb7208d1d2
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 2017)

  Changed paths:
    M src/video.cpp

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


  Commit: fb240b62ca04d4ea40db7f8ccda669669a2fd3be
      https://github.com/wesnoth/wesnoth/commit/fb240b62ca04d4ea40db7f8ccda669669a2fd3be
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 0aeb46d52347f1f4c91940d588d95c2fb7dfaa18
      https://github.com/wesnoth/wesnoth/commit/0aeb46d52347f1f4c91940d588d95c2fb7dfaa18
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: a33ef770bccadfc27221c5285018c5a46774a646
      https://github.com/wesnoth/wesnoth/commit/a33ef770bccadfc27221c5285018c5a46774a646
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 9bf09acc0416ac805851c1f7bab6bb77b4ec8021
      https://github.com/wesnoth/wesnoth/commit/9bf09acc0416ac805851c1f7bab6bb77b4ec8021
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 4615a930fa4ab35175583e8bf322aada3cd89786
      https://github.com/wesnoth/wesnoth/commit/4615a930fa4ab35175583e8bf322aada3cd89786
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 2feae1666250db8aea021b993ff4d34f2292fa8d
      https://github.com/wesnoth/wesnoth/commit/2feae1666250db8aea021b993ff4d34f2292fa8d
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 7adb832d20fba9408c20259c4c104db58398d5f0
      https://github.com/wesnoth/wesnoth/commit/7adb832d20fba9408c20259c4c104db58398d5f0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 2017)

  Changed paths:
    M src/font/text.cpp

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


  Commit: bacb740a00365392923b9b59b9c70cc780dede38
      https://github.com/wesnoth/wesnoth/commit/bacb740a00365392923b9b59b9c70cc780dede38
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 00908013670dba8474cdcd2778f327e430c311a2
      https://github.com/wesnoth/wesnoth/commit/00908013670dba8474cdcd2778f327e430c311a2
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 8c41fe0fe97dda09d89deda77d6d85439deaa483
      https://github.com/wesnoth/wesnoth/commit/8c41fe0fe97dda09d89deda77d6d85439deaa483
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 2017)

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

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

[ci skip]


  Commit: fdf5be6dc6063cc8d472eabd417152a697a0f548
      https://github.com/wesnoth/wesnoth/commit/fdf5be6dc6063cc8d472eabd417152a697a0f548
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 32a9e9b5cee7e995a419bb50a238ac211e820e41
      https://github.com/wesnoth/wesnoth/commit/32a9e9b5cee7e995a419bb50a238ac211e820e41
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 2017)

  Changed paths:
    M src/sdl/window.cpp

  Log Message:
  -----------
  Enable SDL_HINT_FRAMEBUFFER_ACCELERATION

Not sure if this does anything, really.


  Commit: 125e3a4e0177643a247a9b42cfbf66437e16d212
      https://github.com/wesnoth/wesnoth/commit/125e3a4e0177643a247a9b42cfbf66437e16d212
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 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: 357c8a1f93f286a30b4e2a1143cfd0e625a784d0
      https://github.com/wesnoth/wesnoth/commit/357c8a1f93f286a30b4e2a1143cfd0e625a784d0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-03 (Sat, 03 Jun 2017)

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

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


Compare: https://github.com/wesnoth/wesnoth/compare/21ec919dfb45...357c8a1f93f2


More information about the Commits mailing list