diff options
author | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
commit | 5f61de0e683a34df6fbe66a8264318f2a049ef04 (patch) | |
tree | 316a53822b6bbbcd54163aabc472eba06fc7ecb6 | |
parent | 610d2eec0054af40b82f38ddb81afc09b5bdf73b (diff) | |
download | scummvm-rg350-5f61de0e683a34df6fbe66a8264318f2a049ef04.tar.gz scummvm-rg350-5f61de0e683a34df6fbe66a8264318f2a049ef04.tar.bz2 scummvm-rg350-5f61de0e683a34df6fbe66a8264318f2a049ef04.zip |
GRAPHICS: Skip empty rects in VectorRender*'s drawTabAlg.
-rw-r--r-- | graphics/VectorRendererSpec.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 260e621b2b..fda0021201 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -1035,6 +1035,11 @@ drawTriangle(int x, int y, int w, int h, TriangleOrientation orient) { template<typename PixelType> void VectorRendererSpec<PixelType>:: drawTabAlg(int x1, int y1, int w, int h, int r, PixelType color, VectorRenderer::FillMode fill_m, int baseLeft, int baseRight) { + // Don't draw anything for empty rects. + if (w <= 0 || h <= 0) { + return; + } + int f, ddF_x, ddF_y; int x, y, px, py; int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel; @@ -2018,6 +2023,11 @@ drawLineAlg(int x1, int y1, int x2, int y2, uint dx, uint dy, PixelType color) { template<typename PixelType> void VectorRendererAA<PixelType>:: drawTabAlg(int x1, int y1, int w, int h, int r, PixelType color, VectorRenderer::FillMode fill_m, int baseLeft, int baseRight) { + // Don't draw anything for empty rects. + if (w <= 0 || h <= 0) { + return; + } + int x, y, px, py; int pitch = Base::_activeSurface->pitch / Base::_activeSurface->format.bytesPerPixel; int sw = 0, sp = 0, hp = 0; |