[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.10,1.1.2.11 drawable.
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.10,1.1.2.11 drawable.cpp,1.1.2.8,1.1.2.9 rotozoom.cpp,1.3.2.3,1.3.2.4 stretch.cpp,1.3.2.3,1.3.2.4 |
Date: |
Thu, 31 Oct 2002 05:38:06 -0500 |
Update of /cvsroot/paragui/paragui/src/draw
In directory subversions:/tmp/cvs-serv23350/src/draw
Modified Files:
Tag: devel-opengl
draw.cpp drawable.cpp rotozoom.cpp stretch.cpp
Log Message:
LOTS of updates.
This branch now largely works - actually outside of what seems to be a
libstdc++ bug that triggers in paratest, all the tests now work except gltest
and testdummy.
OpenGL driver DOES work, but isn't complete. Also tends to crash when opengl
isn't threadsafe... such as with Matrox G450 *sigh*.
Dummy driver still needs updates.
Index: draw.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/draw.cpp,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -C2 -r1.1.2.10 -r1.1.2.11
*** draw.cpp 30 Oct 2002 20:15:17 -0000 1.1.2.10
--- draw.cpp 31 Oct 2002 10:38:03 -0000 1.1.2.11
***************
*** 94,105 ****
PG_Draw::PG_Draw* savedefaultdraw;
savedefaultdraw = defaultdraw;
if (draw == NULL) {
! if (defaultdraw != NULL) {
! delete defaultdraw;
! }
defaultdraw = new PG_Draw();
} else {
defaultdraw = draw;
};
return defaultdraw;
};
--- 94,108 ----
PG_Draw::PG_Draw* savedefaultdraw;
savedefaultdraw = defaultdraw;
+ if (savedefaultdraw != NULL) savedefaultdraw->prerm();
if (draw == NULL) {
! /* if (defaultdraw != NULL) { delete defaultdraw; } */
defaultdraw = new PG_Draw();
} else {
defaultdraw = draw;
};
+ if (savedefaultdraw != NULL) {
+ savedefaultdraw->postrm();
+ delete savedefaultdraw;
+ };
return defaultdraw;
};
***************
*** 120,123 ****
--- 123,130 ----
};
+ void PG_Draw::PG_Draw::preinit() {};
+ void PG_Draw::PG_Draw::prerm() {};
+ void PG_Draw::PG_Draw::postrm() {};
+
void PG_Draw::PG_Draw::init(Uint32 flags) {
this->flags = flags;
***************
*** 130,134 ****
void PG_Draw::PG_Draw::quit() {
! fprintf(stderr, "%s:%s:%i flags %x\n", __FILE__, __FUNCTION__, __LINE__,
flags);
SDL_QuitSubSystem(flags);
};
--- 137,141 ----
void PG_Draw::PG_Draw::quit() {
! /* fprintf(stderr, "%s:%s:%i flags %x\n", __FILE__, __FUNCTION__, __LINE__,
flags); */
SDL_QuitSubSystem(flags);
};
***************
*** 349,357 ****
t = SDL_ConvertSurface(src, src->format, src->flags);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
attach(surf);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
src->w, src->h);
return surf;
};
--- 356,364 ----
t = SDL_ConvertSurface(src, src->format, src->flags);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
attach(surf);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! // fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
src->w, src->h);
return surf;
};
***************
*** 366,374 ****
};
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
attach(surf);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
src->w, src->h);
return surf;
};
--- 373,381 ----
};
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
attach(surf);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! // fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
src->w, src->h);
return surf;
};
***************
*** 388,396 ****
t = ::PG_Draw::CreateGradient(r, gradient);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
attach(surf);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__, r.w,
r.h);
return surf;
#endif
--- 395,403 ----
t = ::PG_Draw::CreateGradient(r, gradient);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
attach(surf);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! // fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
r.w, r.h);
return surf;
#endif
***************
*** 405,413 ****
t = ::PG_Draw::CreateGradient(r, ul, ur, dl, dr);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
attach(surf);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__, r.w,
r.h);
return surf;
#endif
--- 412,420 ----
t = ::PG_Draw::CreateGradient(r, ul, ur, dl, dr);
if (t == NULL) { PG_LogERR("SDL: %s", SDL_GetError()); exit(-1); }
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
surf = new PG_DrawableSurface(t);
attach(surf);
if (surf == NULL) { PG_LogERR("failed to create window"); exit(-1); }
! // fprintf(stderr, "%s:%s:%i %i,%i\n", __FILE__, __FUNCTION__, __LINE__,
r.w, r.h);
return surf;
#endif
Index: drawable.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/Attic/drawable.cpp,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -r1.1.2.8 -r1.1.2.9
*** drawable.cpp 30 Oct 2002 20:15:17 -0000 1.1.2.8
--- drawable.cpp 31 Oct 2002 10:38:04 -0000 1.1.2.9
***************
*** 148,152 ****
void PG_Draw::PG_DrawableSurface::BlitScale(PG_DrawableSurface* src, bool
smooth) {
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
::PG_Draw::BlitScale(src, this, smooth);
};
--- 148,152 ----
void PG_Draw::PG_DrawableSurface::BlitScale(PG_DrawableSurface* src, bool
smooth) {
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
::PG_Draw::BlitScale(src, this, smooth);
};
***************
*** 187,191 ****
double zoom,
bool smooth) {
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
return ::PG_Draw::RotoScaleSurface(this, angle, zoom, smooth);
};
--- 187,191 ----
double zoom,
bool smooth) {
! // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
return ::PG_Draw::RotoScaleSurface(this, angle, zoom, smooth);
};
Index: rotozoom.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/rotozoom.cpp,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -C2 -r1.3.2.3 -r1.3.2.4
*** rotozoom.cpp 30 Oct 2002 09:16:29 -0000 1.3.2.3
--- rotozoom.cpp 31 Oct 2002 10:38:04 -0000 1.3.2.4
***************
*** 81,85 ****
}
if ((say = (int *) malloc ((dst->GetHeight() + 1) * sizeof (Uint32)))
== NULL) {
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free (sax);
return (-1);
--- 81,84 ----
***************
*** 188,194 ****
/* Remove temp arrays */
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free (sax);
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free (say);
--- 187,191 ----
***************
*** 215,219 ****
if ((say = (Uint32 *) malloc (dst->GetHeight() * sizeof (Uint32))) ==
NULL) {
if (sax != NULL) {
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__,
__LINE__);
free (sax);
}
--- 212,215 ----
***************
*** 279,285 ****
/* Remove temp arrays */
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free (sax);
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free (say);
--- 275,279 ----
Index: stretch.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/draw/stretch.cpp,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -C2 -r1.3.2.3 -r1.3.2.4
*** stretch.cpp 30 Oct 2002 09:16:29 -0000 1.3.2.3
--- stretch.cpp 31 Oct 2002 10:38:04 -0000 1.3.2.4
***************
*** 540,552 ****
}
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free(raster);
/* free the memory allocated for horizontal filter weights */
for (i = 0; i < tmp_w; ++i) {
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free(contrib[i].p);
}
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free(contrib);
--- 540,549 ----
***************
*** 630,642 ****
}
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free(raster);
/* free the memory allocated for vertical filter weights */
for (i = 0; i < tmp_h; ++i) {
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free(contrib[i].p);
}
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
free(contrib);
--- 627,636 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/draw draw.cpp,1.1.2.10,1.1.2.11 drawable.cpp,1.1.2.8,1.1.2.9 rotozoom.cpp,1.3.2.3,1.3.2.4 stretch.cpp,1.3.2.3,1.3.2.4,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui configure.in,1.8.2.7,1.8.2.8
- Next by Date:
[paragui-cvs] CVS: paragui/src/core sdlloadso.c,NONE,1.1.2.1 sdlloadso.h,NONE,1.1.2.1 Makefile.am,1.4.2.4,1.4.2.5 pgapplication.cpp,1.10.2.10,1.10.2.11 pgdriver.cpp,1.1.2.2,1.1.2.3
- Previous by thread:
[paragui-cvs] CVS: paragui configure.in,1.8.2.7,1.8.2.8
- Next by thread:
[paragui-cvs] CVS: paragui/src/core sdlloadso.c,NONE,1.1.2.1 sdlloadso.h,NONE,1.1.2.1 Makefile.am,1.4.2.4,1.4.2.5 pgapplication.cpp,1.10.2.10,1.10.2.11 pgdriver.cpp,1.1.2.2,1.1.2.3
- Index(es):