debuged some horrible race conditions & deadlocks

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@160 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-24 00:12:06 +00:00
parent 5bed5892f3
commit 40606d975e
6 changed files with 25 additions and 15 deletions
+3
View File
@@ -144,6 +144,8 @@ void resample_and_clip(const Image& img_in, Image& img_out, wxRect rect) {
// fill an image with 100% transparent, except for the given rectangle
void fill_transparent(Image& img, int dx, int dy, int w, int h) {
if (!img.HasAlpha()) img.InitAlpha();
memset(img.GetAlpha(), 0, img.GetWidth() * img.GetHeight());
/*/?
int iw = img.GetWidth(), ih = img.GetHeight();
Byte* data = img.GetAlpha();
// fill
@@ -160,6 +162,7 @@ void fill_transparent(Image& img, int dx, int dy, int w, int h) {
for (; y < ih ; ++y) {
for (int x = 0 ; x < iw ; ++x) *data++ = 0;
}
*/
}
void resample_preserve_aspect(const Image& img_in, Image& img_out) {