[Commits] [wesnoth/wesnoth] 14df48: SDL/Window: set render scaling method to linear

GitHub noreply at github.com
Tue Jun 6 11:13:50 UTC 2017


  Branch: refs/heads/accelerated_rendering
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 14df48d6ac5f9043c84dfbd5e70095f4d87419ef
      https://github.com/wesnoth/wesnoth/commit/14df48d6ac5f9043c84dfbd5e70095f4d87419ef
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 098c9ba93b2e2afe4bb32e22ae798ae46a34c613
      https://github.com/wesnoth/wesnoth/commit/098c9ba93b2e2afe4bb32e22ae798ae46a34c613
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M src/video.cpp

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


  Commit: 986f2a33d0e4f2c7a82a517822ea16b155f8301c
      https://github.com/wesnoth/wesnoth/commit/986f2a33d0e4f2c7a82a517822ea16b155f8301c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 828a635d560cad5d8db57aa73053949a9b66067a
      https://github.com/wesnoth/wesnoth/commit/828a635d560cad5d8db57aa73053949a9b66067a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 0b6148680e8de086251316ae1d3a9744b5af9b35
      https://github.com/wesnoth/wesnoth/commit/0b6148680e8de086251316ae1d3a9744b5af9b35
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 1b867f3177eff5c435a942a3e9793fbe0b8e2f6c
      https://github.com/wesnoth/wesnoth/commit/1b867f3177eff5c435a942a3e9793fbe0b8e2f6c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: e9a76aee4994718aabc357b9b4b4e356bb285025
      https://github.com/wesnoth/wesnoth/commit/e9a76aee4994718aabc357b9b4b4e356bb285025
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 959917784ae17d754c2df906592cd8111e45b818
      https://github.com/wesnoth/wesnoth/commit/959917784ae17d754c2df906592cd8111e45b818
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 6559b13bb0edb4e5544d7d3401e619b678d07d7b
      https://github.com/wesnoth/wesnoth/commit/6559b13bb0edb4e5544d7d3401e619b678d07d7b
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M src/font/text.cpp

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


  Commit: 3398be195d124f839781765cb9655e549eb4fc62
      https://github.com/wesnoth/wesnoth/commit/3398be195d124f839781765cb9655e549eb4fc62
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 33b478bd94fc4ae13fb520e05bd4e7d518ea4a5d
      https://github.com/wesnoth/wesnoth/commit/33b478bd94fc4ae13fb520e05bd4e7d518ea4a5d
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 1107da389676342164401d7981e75309fc015bb1
      https://github.com/wesnoth/wesnoth/commit/1107da389676342164401d7981e75309fc015bb1
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

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

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

[ci skip]


  Commit: d5251c60f701999b9fd733e9fc59798e1d81980c
      https://github.com/wesnoth/wesnoth/commit/d5251c60f701999b9fd733e9fc59798e1d81980c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: fa888b381eaced946912a0c1aba5a16a3336eacd
      https://github.com/wesnoth/wesnoth/commit/fa888b381eaced946912a0c1aba5a16a3336eacd
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M src/sdl/window.cpp

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

Not sure if this does anything, really.


  Commit: 9378fe348567d52166767280ca481aec57dc5629
      https://github.com/wesnoth/wesnoth/commit/9378fe348567d52166767280ca481aec57dc5629
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 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: 80a8e457dfa01262c5c1e84503a6eb368f2dcae9
      https://github.com/wesnoth/wesnoth/commit/80a8e457dfa01262c5c1e84503a6eb368f2dcae9
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

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

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


  Commit: d6219c069bba2c5c3e1a94604353412a905f8bce
      https://github.com/wesnoth/wesnoth/commit/d6219c069bba2c5c3e1a94604353412a905f8bce
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

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

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


  Commit: a8e07a5c1922c0da466d05bbf8f0157fc2c1269e
      https://github.com/wesnoth/wesnoth/commit/a8e07a5c1922c0da466d05bbf8f0157fc2c1269e
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 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: 51af124a2c4ef873a38b12fb524992a95fc5c469
      https://github.com/wesnoth/wesnoth/commit/51af124a2c4ef873a38b12fb524992a95fc5c469
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

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

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


  Commit: 0be2ff336ea736e9da7d9b62fb4ffedb4521dfa6
      https://github.com/wesnoth/wesnoth/commit/0be2ff336ea736e9da7d9b62fb4ffedb4521dfa6
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 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: f3e4c1377c88d6f363480a132fcb56bc41cb3e51
      https://github.com/wesnoth/wesnoth/commit/f3e4c1377c88d6f363480a132fcb56bc41cb3e51
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M src/video.cpp

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


Compare: https://github.com/wesnoth/wesnoth/compare/b89272414a0f...f3e4c1377c88


More information about the Commits mailing list