From 425d963bd3c927e529efdfed817960dec8de4552 Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Wed, 22 Jun 2016 17:27:32 +0600 Subject: GUI: Fix ThemeItemTextData's dirty rectangle --- graphics/VectorRendererSpec.cpp | 10 +++++----- graphics/VectorRendererSpec.h | 10 ---------- 2 files changed, 5 insertions(+), 15 deletions(-) (limited to 'graphics') diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 8a471d522e..6281de7f63 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -2382,18 +2382,18 @@ drawRoundedSquareShadow(int x1, int y1, int r, int w, int h, int offset) { if (y + ystart < _clippingArea.top || y + ystart > _clippingArea.bottom) continue; if (((1 << x) & hb) == 0) { - blendFillClip(xstart + r + x, ptr_tl - y - px, ptr_tr + y - px, color, (uint8)alpha); + blendFill(ptr_tl - y - px, ptr_tr + y - px, color, (uint8)alpha); // Will create a dark line of pixles if left out if (hb > 0) { - blendFillClip(x, ptr_bl - y + px, ptr_br + y + px, color, (uint8)alpha); + blendFill(ptr_bl - y + px, ptr_br + y + px, color, (uint8)alpha); } hb |= (1 << x); } if (((1 << y) & hb) == 0) { - blendFillClip(x, ptr_tl - x - py, ptr_tr + x - py, color, (uint8)alpha); - blendFillClip(x, ptr_bl - x + py, ptr_br + x + py, color, (uint8)alpha); + blendFill(ptr_tl - x - py, ptr_tr + x - py, color, (uint8)alpha); + blendFill(ptr_bl - x + py, ptr_br + x + py, color, (uint8)alpha); hb |= (1 << y); } } @@ -2402,7 +2402,7 @@ drawRoundedSquareShadow(int x1, int y1, int r, int w, int h, int offset) { int realy = ystart; while (short_h--) { if (realy >= _clippingArea.top && realy <= _clippingArea.bottom) - blendFillClip(xstart+x, ptr_fill, ptr_fill + width + 1, color, (uint8)alpha); + blendFill(ptr_fill, ptr_fill + width + 1, color, (uint8)alpha); ptr_fill += pitch; ++realy; } diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h index 8a101b8e5a..8a7ce78cba 100644 --- a/graphics/VectorRendererSpec.h +++ b/graphics/VectorRendererSpec.h @@ -252,16 +252,6 @@ protected: } } - inline void blendFillClip(int x, PixelType *first, PixelType *last, PixelType color, uint8 alpha) { - while (first != last) { - if (x >= _clippingArea.left && x <= _clippingArea.right) - blendPixelPtr(first++, color, alpha); - else - ++first; - ++x; - } - } - void darkenFill(PixelType *first, PixelType *last); const PixelFormat _format; -- cgit v1.2.3