aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRendererSpec.cpp
AgeCommit message (Collapse)Author
2018-01-27GRAPHICS: Fix drawing clipped key colored bitmapsBastien Bouclet
The previous implementation was not clipping the bottom part of the bitmap.
2017-12-30GRAPHICS: Fix incorrect call to blendFill in drawRoundedSquareShadowClipBastien Bouclet
Was broken in commit 622adff628519c16991b4edacb7283660d1630e1.
2017-12-30GRAPHICS: Speed up drawing of rounded square soft shadowsBastien Bouclet
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-03ALL: Remove obsolete register keywordColin Snover
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-11-12GRAPHICS: Fix buffer overflow in drawBevelSquareAlgClipBastien Bouclet
Port of the fix from 0d8afad55.
2017-11-11GRAPHICS: Fix buffer overflow in drawBevelSquareAlgColin Snover
Thanks to garethbp for discovering the issue and providing a fix. Fixes Trac#6468.
2017-08-06JANITORIAL: Silence some more GCC 7 fallthrough warningsTorbjörn Andersson
These weren't explicitly flagged as deliberate, but I recognize Duff's Device when I see it.
2016-10-09JANITORIAL: Remove more trailing spacesEugene Sandulenko
2016-08-24GUI: Added transparency to PicWidgetsEugene Sandulenko
2016-08-24GUI: Implemented centering of dialog backgroundEugene Sandulenko
2016-08-24GUI: Added possibility to specify scale mode for AlphaBitmapsEugene Sandulenko
2016-08-24GUI: Plug NinePatch bitmaps into parserEugene Sandulenko
2016-08-24GUI: Implemented more modes to autoscaleEugene Sandulenko
2016-08-24GUI: Implemented alphabitmap autoscaleEugene Sandulenko
2016-08-24GUI: Implemented possibility to use alphabitmaps in GraphicsWidgetEugene Sandulenko
2016-08-24GUI: Added new alphabitmap image typeEugene Sandulenko
2016-07-11GRAPHICS: Fix copy/paste error in blitAlphaBitmapClip() (CID 1357410)Torbjörn Andersson
2016-07-11GRAPHICS: Fix copy/paste error in blitSurfaceClip (CID 1357411)Torbjörn Andersson
2016-07-03JANITORIAL: Fix a few warningsAlexander Tkachev
2016-07-03JANITORIAL: Remove trailing spacesAlexander Tkachev
2016-07-03GUI: Fix blitAlphaBitmapClip()Alexander Tkachev
2016-07-03GUI: Add blitAlphaBitmapClip()Alexander Tkachev
2016-07-03GUI: Add fillSurfaceClip()Alexander Tkachev
2016-07-03GUI: Fix drawRoundedSquareClip()Alexander Tkachev
2016-07-03GUI: Add drawTabClip()Alexander Tkachev
2016-07-03GUI: Add drawBeveledSquareClip()Alexander Tkachev
2016-07-03GUI: Add drawLineClip()Alexander Tkachev
2016-07-03GUI: Add drawCircle()Alexander Tkachev
2016-07-03GUI: Add drawSquareClip()Alexander Tkachev
2016-07-03GUI: Add VectorRendererSpec::drawTriangleClip()Alexander Tkachev
2016-07-03GUI: Add drawRoundedSquareShadowClip()Alexander Tkachev
2016-07-03GUI: Remove unnecessary debug outputAlexander Tkachev
2016-07-03GUI: Fix ThemeItemTextData's dirty rectangleAlexander Tkachev
2016-07-03GUI: drawRoundedSquareClip()Alexander Tkachev
2016-07-03GUI: clippingRect propagated deeperAlexander Tkachev
2016-03-26GRAPHICS: Prevent crash when drawing 0-height rounded cornersOri Avtalion
Opening/closing the console when scroll bars were visible caused occasional crashes. Fixes #7089.
2016-02-21GRAPHICS: Remove superfluous ABS usage to silence a warning.Johannes Schickel
2016-02-21GRAPHICS: Skip empty rects and empty shadows in ↵Johannes Schickel
VectorRendererSpec::drawSquareShadow.
2016-02-21GRAPHICS: Skip empty rects in VectorRenderer*'s drawInteriorRoundedSquareAlg.Johannes Schickel
2016-02-21GRAPHICS: Skip empty rects in VectorRendererSpec::drawTriangleFast.Johannes Schickel
2016-02-21GRAPHICS: Skip empty rects in VectorRendererSpec::drawSquareAlg.Johannes Schickel
2016-02-21GRAPHICS: Skip empty rects in VectorRender*'s drawTabAlg.Johannes Schickel
2016-02-21GRAPHICS: Make VectorRendererAA::drawLineAlg never divide by zero.Johannes Schickel
It won't crash any longer in the case dx = dy = 0.
2016-02-21GRAPHICS: Let drawLineAlg in VectorRenderer code take unsigned dx, dy.Johannes Schickel
2016-02-21GRAPHICS: Skip empty rects in VectorRendererSpec::drawTriangleVertAlg.Johannes Schickel
2016-02-21GRAPHICS: Add comments about safe divisions in VectorRendererSpec.cpp.Johannes Schickel
2014-10-28GRAPHICS: Remove trailing whitespaceFilippos Karapetis
2014-05-27GRAPHICS: colour -> color in VectorRendererSpec code.Johannes Schickel
2014-01-10GRAPHICS: Fix dest alpha formula in blendPixelPtrMarcus Comstedt
The original alpha computation formula had a problem: If something was drawn on top of a pixel that was already fully opaque, there would be an overflow in the computed alpha, and the destination alpha would be truncated to 0 (fully transparent). In commit 264ba4a9 this formula was replaced with another one, which did not have overflows but also was not correct. This commits introduces a new formula, where the rounding errors have been turned in another direction; drawing a fully opaque pixel on top of a transparent one would result in a pixel which is almost, but not fully, opaque. However, this is no problem in practice, since drawing fully opaque pixels can be achieved with much less code as a special case, so add that (also improves rendering speed).
2014-01-10GRAPHICS: Fix computation of addA in darkenFill()Marcus Comstedt
The old computation had rounding issues, causing alpha to leak into the red (usually) component. There's a much easier way to compute it that does not lead to such problems: What should really happen is that the two top bits of the A component should be set to 1 (thus adding 75% alpha). So compute it that way for speed and precision.