mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
* CFrameBuffer::waitForIdle: Added a parameter
to identify the execution at Debug Output - For example: name of the calling function
This commit is contained in:
@@ -443,7 +443,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
|
|||||||
/* the GXA seems to do it's job asynchonously, so we need to wait until
|
/* the GXA seems to do it's job asynchonously, so we need to wait until
|
||||||
it's ready, otherwise the font will sometimes "be overwritten" with
|
it's ready, otherwise the font will sometimes "be overwritten" with
|
||||||
background color or bgcolor will be wrong */
|
background color or bgcolor will be wrong */
|
||||||
frameBuffer->waitForIdle();
|
frameBuffer->waitForIdle("Font::RenderString");
|
||||||
#endif
|
#endif
|
||||||
/* fetch bgcolor from framebuffer, using lower left edge of the font... */
|
/* fetch bgcolor from framebuffer, using lower left edge of the font... */
|
||||||
fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x +
|
fb_pixel_t bgcolor = *(frameBuffer->getFrameBufferPointer() + x +
|
||||||
|
@@ -145,7 +145,7 @@ void CFrameBuffer::add_gxa_sync_marker(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* wait until the current marker comes out of the GXA command queue */
|
/* wait until the current marker comes out of the GXA command queue */
|
||||||
void CFrameBuffer::waitForIdle(void)
|
void CFrameBuffer::waitForIdle(const char* func)
|
||||||
{
|
{
|
||||||
unsigned int cfg, count = 0;
|
unsigned int cfg, count = 0;
|
||||||
do {
|
do {
|
||||||
@@ -159,8 +159,12 @@ void CFrameBuffer::waitForIdle(void)
|
|||||||
//fprintf(stderr, "%s: read %02x, expected %02x\n", __FUNCTION__, cfg, _mark);
|
//fprintf(stderr, "%s: read %02x, expected %02x\n", __FUNCTION__, cfg, _mark);
|
||||||
} while(++count < 2048); /* don't deadlock here if there is an error */
|
} while(++count < 2048); /* don't deadlock here if there is an error */
|
||||||
|
|
||||||
if (count > 512) /* more than 100 are unlikely, */
|
if (count > 512) /* more than 100 are unlikely, */{
|
||||||
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%d)!\n", count);
|
if (func != NULL)
|
||||||
|
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%04d) [%s]!\n", count, func);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "CFrameBuffer::waitForIdle: count is big (%d)!\n", count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* USE_NEVIS_GXA */
|
#endif /* USE_NEVIS_GXA */
|
||||||
|
|
||||||
@@ -1213,7 +1217,7 @@ void CFrameBuffer::paintBoxFrame(const int x, const int y, const int dx, const i
|
|||||||
if (type && radius) {
|
if (type && radius) {
|
||||||
radius = limitRadius(dx, dy, radius);
|
radius = limitRadius(dx, dy, radius);
|
||||||
int line = 0;
|
int line = 0;
|
||||||
waitForIdle();
|
waitForIdle("CFrameBuffer::paintBoxFrame");
|
||||||
while (line < dy) {
|
while (line < dy) {
|
||||||
int ofs = 0, ofs_i = 0;
|
int ofs = 0, ofs_i = 0;
|
||||||
// inner box
|
// inner box
|
||||||
|
@@ -235,7 +235,7 @@ class CFrameBuffer
|
|||||||
bool Locked(void) { return locked; };
|
bool Locked(void) { return locked; };
|
||||||
#ifdef USE_NEVIS_GXA
|
#ifdef USE_NEVIS_GXA
|
||||||
void add_gxa_sync_marker(void);
|
void add_gxa_sync_marker(void);
|
||||||
void waitForIdle(void);
|
void waitForIdle(const char* func=NULL);
|
||||||
#else
|
#else
|
||||||
inline void waitForIdle(void) {};
|
inline void waitForIdle(void) {};
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user