exterminate the most annoying and least useful debug messages
This commit is contained in:
parent
b2bf476836
commit
b67d81853d
6 changed files with 4 additions and 30 deletions
|
@ -152,7 +152,7 @@ void r_flush_sprites(void) {
|
|||
_r_sprite_batch.base_instance += pending;
|
||||
|
||||
if(_r_sprite_batch.vbuf.size - _r_sprite_batch.vbuf.offset < sizeof(SpriteAttribs)) {
|
||||
log_debug("Invalidating after %u sprites", _r_sprite_batch.base_instance);
|
||||
// log_debug("Invalidating after %u sprites", _r_sprite_batch.base_instance);
|
||||
r_vertex_buffer_invalidate(&_r_sprite_batch.vbuf);
|
||||
_r_sprite_batch.base_instance = 0;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ static bool include_shader(const char *path, SDL_RWops *dest, int include_level,
|
|||
return false;
|
||||
}
|
||||
|
||||
log_debug("[%i] %s", include_level, path);
|
||||
// log_debug("[%i] %s", include_level, path);
|
||||
|
||||
SDL_RWops *stream = vfs_open(path, VFS_MODE_READ);
|
||||
|
||||
|
|
|
@ -430,7 +430,7 @@ static void delete_spritesheet(SpriteSheetAnchor *spritesheets, SpriteSheet *ss)
|
|||
}
|
||||
|
||||
static Glyph* load_glyph(Font *font, FT_UInt gindex, SpriteSheetAnchor *spritesheets) {
|
||||
log_debug("Loading glyph 0x%08x", gindex);
|
||||
// log_debug("Loading glyph 0x%08x", gindex);
|
||||
|
||||
if(++font->glyphs_used == font->glyphs_allocated) {
|
||||
font->glyphs_allocated *= 2;
|
||||
|
@ -492,7 +492,7 @@ static Glyph* get_glyph(Font *fnt, charcode_t cp) {
|
|||
if(!ht_lookup(&fnt->charcodes_to_glyph_ofs, cp, &ofs)) {
|
||||
Glyph *glyph;
|
||||
uint ft_index = FT_Get_Char_Index(fnt->face, cp);
|
||||
log_debug("Glyph for charcode 0x%08lx not cached", cp);
|
||||
// log_debug("Glyph for charcode 0x%08lx not cached", cp);
|
||||
|
||||
if(ft_index == 0 && cp != UNICODE_UNKNOWN) {
|
||||
log_debug("Font has no glyph for charcode 0x%08lx", cp);
|
||||
|
|
|
@ -41,8 +41,6 @@ struct Task {
|
|||
static TaskManager *g_taskmgr;
|
||||
|
||||
static void taskmgr_free(TaskManager *mgr) {
|
||||
log_debug("%08lx freeing task manager %p", SDL_ThreadID(), (void*)mgr);
|
||||
|
||||
if(mgr->mutex != NULL) {
|
||||
SDL_DestroyMutex(mgr->mutex);
|
||||
}
|
||||
|
@ -58,8 +56,6 @@ static void task_free(Task *task) {
|
|||
assert(!task->in_queue);
|
||||
assert(task->disowned);
|
||||
|
||||
log_debug("%08lx freeing task %p", SDL_ThreadID(), (void*)task);
|
||||
|
||||
if(task->userdata_free_callback != NULL) {
|
||||
task->userdata_free_callback(task->userdata);
|
||||
}
|
||||
|
@ -79,8 +75,6 @@ static int taskmgr_thread(void *arg) {
|
|||
TaskManager *mgr = arg;
|
||||
attr_unused SDL_threadID tid = SDL_ThreadID();
|
||||
|
||||
log_debug("%08lx stage 1", tid);
|
||||
|
||||
if(SDL_SetThreadPriority(mgr->thread_prio) < 0) {
|
||||
log_sdl_error("SDL_SetThreadPriority");
|
||||
}
|
||||
|
@ -101,8 +95,6 @@ static int taskmgr_thread(void *arg) {
|
|||
SDL_UnlockMutex(mgr->mutex);
|
||||
} while(!running && !aborted);
|
||||
|
||||
log_debug("%08lx stage 2", tid);
|
||||
|
||||
while(running && !aborted) {
|
||||
SDL_LockMutex(mgr->mutex);
|
||||
Task *task = alist_pop(&mgr->queue);
|
||||
|
@ -111,15 +103,12 @@ static int taskmgr_thread(void *arg) {
|
|||
aborted = mgr->aborted;
|
||||
|
||||
if(running && task == NULL && !aborted) {
|
||||
log_debug("%08lx sleep: %i %i %p", tid, running, aborted, (void*)task);
|
||||
SDL_CondWait(mgr->cond, mgr->mutex);
|
||||
log_debug("%08lx wake", tid);
|
||||
}
|
||||
|
||||
SDL_UnlockMutex(mgr->mutex);
|
||||
|
||||
if(task != NULL) {
|
||||
log_debug("%08lx taking task %p", tid, (void*)task);
|
||||
SDL_LockMutex(task->mutex);
|
||||
|
||||
bool task_disowned = task->disowned;
|
||||
|
@ -129,7 +118,6 @@ static int taskmgr_thread(void *arg) {
|
|||
}
|
||||
|
||||
if(task->status == TASK_PENDING) {
|
||||
log_debug("%08lx task %p running", tid, (void*)task);
|
||||
task->status = TASK_RUNNING;
|
||||
|
||||
SDL_UnlockMutex(task->mutex);
|
||||
|
@ -140,8 +128,6 @@ static int taskmgr_thread(void *arg) {
|
|||
task->in_queue = false;
|
||||
(void)SDL_AtomicDecRef(&mgr->numtasks);
|
||||
|
||||
log_debug("%08lx task %p done", tid, (void*)task);
|
||||
|
||||
if((task_disowned = task->disowned)) {
|
||||
SDL_UnlockMutex(task->mutex);
|
||||
task_free(task);
|
||||
|
@ -156,8 +142,6 @@ static int taskmgr_thread(void *arg) {
|
|||
(void)SDL_AtomicDecRef(&mgr->numtasks);
|
||||
SDL_UnlockMutex(task->mutex);
|
||||
|
||||
log_debug("%08lx task %p is cancelled", tid, (void*)task);
|
||||
|
||||
if(task_disowned) {
|
||||
task_free(task);
|
||||
}
|
||||
|
@ -167,7 +151,6 @@ static int taskmgr_thread(void *arg) {
|
|||
}
|
||||
}
|
||||
|
||||
log_debug("%08lx thread exiting", tid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -341,14 +324,12 @@ bool task_wait(Task *task, void **result) {
|
|||
bool success = false;
|
||||
|
||||
if(task == NULL) {
|
||||
log_debug("%08lx task was null", SDL_ThreadID());
|
||||
return success;
|
||||
}
|
||||
|
||||
void *_result = NULL;
|
||||
|
||||
SDL_LockMutex(task->mutex);
|
||||
log_debug("%08lx %p %i", SDL_ThreadID(), (void*)task, task->status);
|
||||
|
||||
if(task->status == TASK_CANCELLED) {
|
||||
success = false;
|
||||
|
@ -356,11 +337,9 @@ bool task_wait(Task *task, void **result) {
|
|||
success = true;
|
||||
_result = task->result;
|
||||
} else {
|
||||
log_debug("%08lx %p sleep", SDL_ThreadID(), (void*)task);
|
||||
SDL_CondWait(task->cond, task->mutex);
|
||||
_result = task->result;
|
||||
success = (task->status == TASK_FINISHED);
|
||||
log_debug("%08lx %p wake %i %i", SDL_ThreadID(), (void*)task, task->status, success);
|
||||
}
|
||||
|
||||
SDL_UnlockMutex(task->mutex);
|
||||
|
|
|
@ -45,8 +45,6 @@ static void _vfs_set_error_win32(const char *file, int line) {
|
|||
0, NULL
|
||||
);
|
||||
|
||||
log_debug("%p", buf);
|
||||
|
||||
char *errstr = WIN_StringToUTF8(buf);
|
||||
LocalFree(buf);
|
||||
vfs_set_error("Win32 error %lu: %s [%s:%i]", err, errstr, file, line);
|
||||
|
|
|
@ -238,7 +238,6 @@ void video_set_mode(int w, int h, bool fs, bool resizable) {
|
|||
|
||||
static void* video_screenshot_task(void *arg) {
|
||||
ScreenshotTaskData *tdata = arg;
|
||||
log_debug("%u %u %s", tdata->width, tdata->height, tdata->dest_path);
|
||||
|
||||
uint width = tdata->width;
|
||||
uint height = tdata->height;
|
||||
|
@ -300,8 +299,6 @@ void video_take_screenshot(void) {
|
|||
memset(&tdata, 0, sizeof(tdata));
|
||||
tdata.pixels = r_screenshot(&tdata.width, &tdata.height);
|
||||
|
||||
log_debug("Screenshot requested");
|
||||
|
||||
if(!tdata.pixels) {
|
||||
log_warn("Failed to take a screenshot");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue