[Scummvm-cvs-logs] SF.net SVN: scummvm:[33164] scummvm/branches/gsoc2008-gui/graphics/ VectorRenderer.cpp
Tanoku at users.sourceforge.net
Tanoku at users.sourceforge.net
Mon Jul 21 11:20:16 CEST 2008
Revision: 33164
http://scummvm.svn.sourceforge.net/scummvm/?rev=33164&view=rev
Author: Tanoku
Date: 2008-07-21 09:19:57 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
Valgrind fix: Invalid write in rounded square shadows
Modified Paths:
--------------
scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp 2008-07-21 08:42:51 UTC (rev 33163)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp 2008-07-21 09:19:57 UTC (rev 33164)
@@ -1014,30 +1014,24 @@
// there are 4 pixels on each circle which are drawn twice.
// this is ok on filled circles, but when blending on surfaces,
// we cannot let it blend twice. awful.
- bool *hb = new bool[r];
+ uint32 hb = 0;
- int i = 0;
- while (i < r)
- hb[i++] = false;
-
while (x++ < y) {
__BE_ALGORITHM();
- if (!hb[x]) {
+ if ((1 << x) & hb == 0) {
blendFill(ptr_tr - px - r, ptr_tr + y - px, 0, alpha);
blendFill(ptr_bl - y + px, ptr_br + y + px, 0, alpha);
- hb[x] = true;
+ hb |= (1 << x);
}
- if (!hb[y]) {
+ if ((1 << y) & hb == 0) {
blendFill(ptr_tr - r - py, ptr_tr + x - py, 0, alpha);
blendFill(ptr_bl - x + py, ptr_br + x + py, 0, alpha);
- hb[y] = true;
+ hb |= (1 << y);
}
}
- delete[] hb;
-
while (short_h--) {
blendFill(ptr_fill - r, ptr_fill + blur, 0, alpha);
ptr_fill += pitch;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list