[Commits] [wesnoth/wesnoth] 48be01: SDL/Window: set render scaling method to linear

GitHub noreply at github.com
Fri Jun 2 12:46:10 UTC 2017


  Branch: refs/heads/accelerated_rendering
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 48be01c1064074b4226d03cf65acb5eb46a7f374
      https://github.com/wesnoth/wesnoth/commit/48be01c1064074b4226d03cf65acb5eb46a7f374
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: 0e9c57acca7e6399dfbd8f024f2063ca721b7b4a
      https://github.com/wesnoth/wesnoth/commit/0e9c57acca7e6399dfbd8f024f2063ca721b7b4a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 Jun 2017)

  Changed paths:
    M src/video.cpp

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


  Commit: 142341db26dc7925cbc528f567706850b54f9f35
      https://github.com/wesnoth/wesnoth/commit/142341db26dc7925cbc528f567706850b54f9f35
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: f7e41589724e9f7cb70bbe50fcd7c4a02ca12e90
      https://github.com/wesnoth/wesnoth/commit/f7e41589724e9f7cb70bbe50fcd7c4a02ca12e90
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: b1cc23ba97aa84d097fe9c23b31c57a49233f7a0
      https://github.com/wesnoth/wesnoth/commit/b1cc23ba97aa84d097fe9c23b31c57a49233f7a0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: 2f9c48b2df2d1c4dcfaeb508191bb448164386e1
      https://github.com/wesnoth/wesnoth/commit/2f9c48b2df2d1c4dcfaeb508191bb448164386e1
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: 1f1fdb04c0bb12d6a985082b3703b3f439431638
      https://github.com/wesnoth/wesnoth/commit/1f1fdb04c0bb12d6a985082b3703b3f439431638
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: 32e455f3004bf98da6d6c9edceccda63c1e741a9
      https://github.com/wesnoth/wesnoth/commit/32e455f3004bf98da6d6c9edceccda63c1e741a9
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: 53c575356280a03c20e00700fc00cdb09894297f
      https://github.com/wesnoth/wesnoth/commit/53c575356280a03c20e00700fc00cdb09894297f
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 Jun 2017)

  Changed paths:
    M src/font/text.cpp

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


  Commit: 72b737ecfcfece9df5a8a14a835787e9476e9b21
      https://github.com/wesnoth/wesnoth/commit/72b737ecfcfece9df5a8a14a835787e9476e9b21
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: 759118150aeca8b196ee336352532da4000e95b3
      https://github.com/wesnoth/wesnoth/commit/759118150aeca8b196ee336352532da4000e95b3
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: 4b1ae5c03036b839ab298dc645b7107a63438198
      https://github.com/wesnoth/wesnoth/commit/4b1ae5c03036b839ab298dc645b7107a63438198
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 Jun 2017)

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

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

[ci skip]


  Commit: 5cc41ed609650a260df8ee2a0eb6fe2e5ab9d0ec
      https://github.com/wesnoth/wesnoth/commit/5cc41ed609650a260df8ee2a0eb6fe2e5ab9d0ec
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: df688edf40f25658b8b23fdfbe3e53326da3d949
      https://github.com/wesnoth/wesnoth/commit/df688edf40f25658b8b23fdfbe3e53326da3d949
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 Jun 2017)

  Changed paths:
    M src/sdl/window.cpp

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

Not sure if this does anything, really.


  Commit: 1305922a86e5568f420269d82eda95810dce0df0
      https://github.com/wesnoth/wesnoth/commit/1305922a86e5568f420269d82eda95810dce0df0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 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: 21ec919dfb450ac6ded2ddc9debe0654db370b6a
      https://github.com/wesnoth/wesnoth/commit/21ec919dfb450ac6ded2ddc9debe0654db370b6a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-02 (Fri, 02 Jun 2017)

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

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


Compare: https://github.com/wesnoth/wesnoth/compare/688b797e7d23...21ec919dfb45


More information about the Commits mailing list