Use the GTimer thread for full screen redraws when available to save application stack space.
This commit is contained in:
parent
6a2fc9a647
commit
1384918a1c
1 changed files with 21 additions and 0 deletions
|
@ -49,6 +49,12 @@ static const GWindowManager GNullWindowManager = {
|
||||||
|
|
||||||
gfxQueueASync _GWINList;
|
gfxQueueASync _GWINList;
|
||||||
GWindowManager * _GWINwm;
|
GWindowManager * _GWINwm;
|
||||||
|
#if GFX_USE_GTIMER
|
||||||
|
static GTimer RedrawTimer;
|
||||||
|
static GDisplay * RedrawDisplay;
|
||||||
|
static bool_t RedrawPreserve;
|
||||||
|
static void _gwinRedrawDisplay(void * param);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-----------------------------------------------
|
/*-----------------------------------------------
|
||||||
* Window Routines
|
* Window Routines
|
||||||
|
@ -58,6 +64,10 @@ void _gwmInit(void) {
|
||||||
gfxQueueASyncInit(&_GWINList);
|
gfxQueueASyncInit(&_GWINList);
|
||||||
_GWINwm = (GWindowManager *)&GNullWindowManager;
|
_GWINwm = (GWindowManager *)&GNullWindowManager;
|
||||||
_GWINwm->vmt->Init();
|
_GWINwm->vmt->Init();
|
||||||
|
#if GFX_USE_GTIMER
|
||||||
|
gtimerInit(&RedrawTimer);
|
||||||
|
gtimerStart(&RedrawTimer, _gwinRedrawDisplay, 0, TRUE, TIME_INFINITE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void gwinSetWindowManager(struct GWindowManager *gwm) {
|
void gwinSetWindowManager(struct GWindowManager *gwm) {
|
||||||
|
@ -87,6 +97,17 @@ GWindowMinMax gwinGetMinMax(GHandle gh) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void gwinRedrawDisplay(GDisplay *g, bool_t preserve) {
|
void gwinRedrawDisplay(GDisplay *g, bool_t preserve) {
|
||||||
|
#if GFX_USE_GTIMER
|
||||||
|
RedrawDisplay = g;
|
||||||
|
RedrawPreserve = preserve;
|
||||||
|
gtimerJab(&RedrawTimer);
|
||||||
|
}
|
||||||
|
static void _gwinRedrawDisplay(void * param) {
|
||||||
|
GDisplay *g = RedrawDisplay;
|
||||||
|
bool_t preserve = RedrawPreserve;
|
||||||
|
(void) param;
|
||||||
|
#endif
|
||||||
|
|
||||||
const gfxQueueASyncItem * qi;
|
const gfxQueueASyncItem * qi;
|
||||||
GHandle gh;
|
GHandle gh;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue