Skip to content

Commit

Permalink
GUI2/Canvas: refactor surface blitting out of drawing routines
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vultraz committed Jun 12, 2017
1 parent 7f04a38 commit 38d8829
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 175 deletions.
4 changes: 2 additions & 2 deletions data/gui/widget/button_default.cfg
Expand Up @@ -30,8 +30,8 @@
[image]
x = 2
y = 2
w = "(width)"
h = "(height)"
w = "(width - 2)"
h = "(height - 2)"
name = "buttons/button_normal/{BACKGROUND_IMAGE}.png{IPF}"
[/image]

Expand Down

0 comments on commit 38d8829

Please sign in to comment.