[Commits] [wesnoth/wesnoth] 57c622: GUI2/Canvas: refactor surface blitting out of draw...
GitHub
noreply at github.com
Fri Jun 2 03:53:24 UTC 2017
Branch: refs/heads/accelerated_rendering
Home: https://github.com/wesnoth/wesnoth
Commit: 57c622478b74e0fc138b5a3120c7a3fea40a8090
https://github.com/wesnoth/wesnoth/commit/57c622478b74e0fc138b5a3120c7a3fea40a8090
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: 07834ca899546493e386dd4ca6fe4f251be1cf94
https://github.com/wesnoth/wesnoth/commit/07834ca899546493e386dd4ca6fe4f251be1cf94
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: 89d09200101ab90dc9b3e43d06ed268c66664aa3
https://github.com/wesnoth/wesnoth/commit/89d09200101ab90dc9b3e43d06ed268c66664aa3
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: 274abb8b71813e96c43ff826bc2670d1518c76a1
https://github.com/wesnoth/wesnoth/commit/274abb8b71813e96c43ff826bc2670d1518c76a1
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: 7369a9944e1d475193304906ce44d4dc3b134bb6
https://github.com/wesnoth/wesnoth/commit/7369a9944e1d475193304906ce44d4dc3b134bb6
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: a9bfedfdf3dcdb05382274ad4afdbd834f567945
https://github.com/wesnoth/wesnoth/commit/a9bfedfdf3dcdb05382274ad4afdbd834f567945
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: 106d660b0abf5158532a900fad0a9cae11d42bef
https://github.com/wesnoth/wesnoth/commit/106d660b0abf5158532a900fad0a9cae11d42bef
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: 77291e59d6f437992caed8b400be202ff77041aa
https://github.com/wesnoth/wesnoth/commit/77291e59d6f437992caed8b400be202ff77041aa
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-06-02 (Fri, 02 Jun 2017)
Changed paths:
M src/sdl/rect.cpp
M src/sdl/utils.cpp
Log Message:
-----------
Moved SDL_Rect ostream op to the correct file and improved output formatting
Commit: a9ec2a154ca3df7260421c6dc0c150602c74feb9
https://github.com/wesnoth/wesnoth/commit/a9ec2a154ca3df7260421c6dc0c150602c74feb9
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: ef95308cf2562187148036eccd5622a260813952
https://github.com/wesnoth/wesnoth/commit/ef95308cf2562187148036eccd5622a260813952
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
Compare: https://github.com/wesnoth/wesnoth/compare/c3d166b7c5f0...ef95308cf256
More information about the Commits
mailing list