139 Commits

Author SHA1 Message Date
Adrian Frühwirth
3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Adrian Frühwirth
d36a9ce672 JANITORIAL: Fix formatting 2018-03-23 20:40:30 +01:00
Bastien Bouclet
b272701834 GRAPHICS: Dont clip in the non-clip version of drawRoundedSquareAlg
Fixes missing modern theme GUI dialog borders when using the
non-antialiased renderer.
2018-03-17 16:11:41 +01:00
Bastien Bouclet
d26aa8255d GRAPHICS: Fix drawing clipped key colored bitmaps
The previous implementation was not clipping the bottom part of the
bitmap.
2018-01-27 18:16:08 +01:00
Bastien Bouclet
482c075747 GRAPHICS: Fix incorrect call to blendFill in drawRoundedSquareShadowClip
Was broken in commit 622adff628519c16991b4edacb7283660d1630e1.
2017-12-30 19:37:56 +01:00
Bastien Bouclet
622adff628 GRAPHICS: Speed up drawing of rounded square soft shadows
When drawing a rounded rectangle, first its shadow is drawn, and then
the rectangle proper is drawn over it. This optimization skips drawing
a shadow rectangle that is entirely occluded by the main rectangle.

A quick benchmark shows large improvements to the modern theme GUI draw
speed. On a 1 GHz ARMv7 CPU with optimizations enabled, drawing the add
game dialog @ 1920x1080 went from 976 ms to 136 ms.
2017-12-30 19:04:18 +01:00
Colin Snover
a5bc89102e ALL: Remove obsolete register keyword
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.

It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.

The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.

Closes gh-1079.
2017-12-03 20:27:42 -06:00
Bastien Bouclet
ce3d5ebec1 GRAPHICS: Fix buffer overflow in drawBevelSquareAlgClip
Port of the fix from 0d8afad55.
2017-11-12 10:38:05 +01:00
Colin Snover
0d8afad559 GRAPHICS: Fix buffer overflow in drawBevelSquareAlg
Thanks to garethbp for discovering the issue and providing a fix.

Fixes Trac#6468.
2017-11-11 20:49:19 -06:00
Torbjörn Andersson
5602ca3d64 JANITORIAL: Silence some more GCC 7 fallthrough warnings
These weren't explicitly flagged as deliberate, but I recognize
Duff's Device when I see it.
2017-08-06 15:26:44 +02:00
Eugene Sandulenko
355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
Eugene Sandulenko
6524a8d103 GUI: Added transparency to PicWidgets 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
94bc75ae46 GUI: Implemented centering of dialog background 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
75f9b099dc GUI: Added possibility to specify scale mode for AlphaBitmaps 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
38114eb760 GUI: Plug NinePatch bitmaps into parser 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
ec7312ac13 GUI: Implemented more modes to autoscale 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
4474ccf814 GUI: Implemented alphabitmap autoscale 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
f0c52096f3 GUI: Implemented possibility to use alphabitmaps in GraphicsWidget 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
53a42ececf GUI: Added new alphabitmap image type 2016-08-24 16:07:55 +06:00
Torbjörn Andersson
11ec5ad5a3 GRAPHICS: Fix copy/paste error in blitAlphaBitmapClip() (CID 1357410) 2016-07-11 05:43:24 +02:00
Torbjörn Andersson
6eabc887e1 GRAPHICS: Fix copy/paste error in blitSurfaceClip (CID 1357411) 2016-07-11 05:41:04 +02:00
Alexander Tkachev
6de5324742 JANITORIAL: Fix a few warnings 2016-07-03 12:24:55 +02:00
Alexander Tkachev
cea58cc61c JANITORIAL: Remove trailing spaces 2016-07-03 12:24:53 +02:00
Alexander Tkachev
6fd6043391 GUI: Fix blitAlphaBitmapClip() 2016-07-03 12:24:11 +02:00
Alexander Tkachev
916c86e689 GUI: Add blitAlphaBitmapClip() 2016-07-03 12:23:41 +02:00
Alexander Tkachev
e636894b06 GUI: Add fillSurfaceClip() 2016-07-03 12:23:12 +02:00
Alexander Tkachev
0dcd29e998 GUI: Fix drawRoundedSquareClip() 2016-07-03 12:22:26 +02:00
Alexander Tkachev
80412a4139 GUI: Add drawTabClip() 2016-07-03 12:22:10 +02:00
Alexander Tkachev
ee00156d54 GUI: Add drawBeveledSquareClip() 2016-07-03 12:21:55 +02:00
Alexander Tkachev
05383532b7 GUI: Add drawLineClip() 2016-07-03 12:21:40 +02:00
Alexander Tkachev
2231de040f GUI: Add drawCircle() 2016-07-03 12:21:24 +02:00
Alexander Tkachev
f22d11953d GUI: Add drawSquareClip() 2016-07-03 12:21:09 +02:00
Alexander Tkachev
559ca37daf GUI: Add VectorRendererSpec::drawTriangleClip() 2016-07-03 12:20:37 +02:00
Alexander Tkachev
cccf6eed78 GUI: Add drawRoundedSquareShadowClip() 2016-07-03 12:18:18 +02:00
Alexander Tkachev
e04e13de33 GUI: Remove unnecessary debug output 2016-07-03 12:18:00 +02:00
Alexander Tkachev
425d963bd3 GUI: Fix ThemeItemTextData's dirty rectangle 2016-07-03 12:17:26 +02:00
Alexander Tkachev
8f2d35b0b8 GUI: drawRoundedSquareClip() 2016-07-03 12:16:26 +02:00
Alexander Tkachev
3d2730a0dd GUI: clippingRect propagated deeper 2016-07-03 12:15:51 +02:00
Ori Avtalion
9b69b86f29 GRAPHICS: Prevent crash when drawing 0-height rounded corners
Opening/closing the console when scroll bars were visible caused
occasional crashes. Fixes #7089.
2016-03-26 19:43:16 +03:00
Johannes Schickel
b6b2bcf607 GRAPHICS: Remove superfluous ABS usage to silence a warning. 2016-02-21 17:45:30 +01:00
Johannes Schickel
0a06942e4e GRAPHICS: Skip empty rects and empty shadows in VectorRendererSpec::drawSquareShadow. 2016-02-21 14:41:29 +01:00
Johannes Schickel
edaff1bdea GRAPHICS: Skip empty rects in VectorRenderer*'s drawInteriorRoundedSquareAlg. 2016-02-21 14:41:29 +01:00
Johannes Schickel
1c4f41feed GRAPHICS: Skip empty rects in VectorRendererSpec::drawTriangleFast. 2016-02-21 14:41:29 +01:00
Johannes Schickel
df65bad9d2 GRAPHICS: Skip empty rects in VectorRendererSpec::drawSquareAlg. 2016-02-21 14:41:29 +01:00
Johannes Schickel
5f61de0e68 GRAPHICS: Skip empty rects in VectorRender*'s drawTabAlg. 2016-02-21 14:41:29 +01:00
Johannes Schickel
610d2eec00 GRAPHICS: Make VectorRendererAA::drawLineAlg never divide by zero.
It won't crash any longer in the case dx = dy = 0.
2016-02-21 14:41:29 +01:00
Johannes Schickel
5bc3a5aa3f GRAPHICS: Let drawLineAlg in VectorRenderer code take unsigned dx, dy. 2016-02-21 14:41:29 +01:00
Johannes Schickel
0e7facad76 GRAPHICS: Skip empty rects in VectorRendererSpec::drawTriangleVertAlg. 2016-02-21 14:41:29 +01:00
Johannes Schickel
16aac72b60 GRAPHICS: Add comments about safe divisions in VectorRendererSpec.cpp. 2016-02-21 14:41:29 +01:00
Filippos Karapetis
614de0d761 GRAPHICS: Remove trailing whitespace 2014-10-28 15:38:50 +02:00