diff options
author | 2010-08-21 22:25:58 +0000 | |
---|---|---|
committer | 2010-08-21 22:25:58 +0000 | |
commit | a2f7346d9099da6582b42bc912a2436d8e9c6f44 (patch) | |
tree | a4aec5d15135079bcad4484386e389a7080da494 /src/emu/tilemap.c | |
parent | e8d644d285d743a93b2442d4c2f9b568a38a4715 (diff) |
I had originally wanted to convert the profiler to use scopes (e.g.,
create a stack class that started the profiler in the constructor
and stopped it in the destructor). Sadly, doing that causes gcc to
call out to hook up the unwind chain, and this tanks performance
quite badly, even when the profiler is off.
Since I had already class-ified profiler.c, I decided to keep the old
way of doing things but wrap it in the newer classes. So at least it
wasn't a complete waste of my time.
Search & replace:
profiler_mark_start -> g_profiler.start
profiler_mark_end -> g_profiler.end
Diffstat (limited to 'src/emu/tilemap.c')
-rw-r--r-- | src/emu/tilemap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c index ed9e95d0036..2db2f7aebbf 100644 --- a/src/emu/tilemap.c +++ b/src/emu/tilemap.c @@ -824,7 +824,7 @@ void tilemap_draw_primask(bitmap_t *dest, const rectangle *cliprect, tilemap_t * if (!tmap->enable) return; -profiler_mark_start(PROFILER_TILEMAP_DRAW); +g_profiler.start(PROFILER_TILEMAP_DRAW); /* configure the blit parameters based on the input parameters */ configure_blit_parameters(&blit, tmap, dest, cliprect, flags, priority, priority_mask); @@ -927,7 +927,7 @@ profiler_mark_start(PROFILER_TILEMAP_DRAW); } } } -profiler_mark_end(); +g_profiler.stop(); } @@ -962,7 +962,7 @@ void tilemap_draw_roz_primask(bitmap_t *dest, const rectangle *cliprect, tilemap return; } -profiler_mark_start(PROFILER_TILEMAP_DRAW_ROZ); +g_profiler.start(PROFILER_TILEMAP_DRAW_ROZ); /* configure the blit parameters */ configure_blit_parameters(&blit, tmap, dest, cliprect, flags, priority, priority_mask); @@ -971,7 +971,7 @@ profiler_mark_start(PROFILER_TILEMAP_DRAW_ROZ); /* then do the roz copy */ tilemap_draw_roz_core(tmap, &blit, startx, starty, incxx, incxy, incyx, incyy, wraparound); -profiler_mark_end(); +g_profiler.stop(); } @@ -1274,7 +1274,7 @@ static void pixmap_update(tilemap_t *tmap, const rectangle *cliprect) if (tmap->all_tiles_clean) return; -profiler_mark_start(PROFILER_TILEMAP_DRAW); +g_profiler.start(PROFILER_TILEMAP_DRAW); /* compute which columns and rows to update */ if (cliprect != NULL) @@ -1314,7 +1314,7 @@ profiler_mark_start(PROFILER_TILEMAP_DRAW); if (mincol == 0 && minrow == 0 && maxcol == tmap->cols - 1 && maxcol == tmap->rows - 1) tmap->all_tiles_clean = TRUE; -profiler_mark_end(); +g_profiler.stop(); } @@ -1329,7 +1329,7 @@ static void tile_update(tilemap_t *tmap, tilemap_logical_index logindex, UINT32 tilemap_memory_index memindex; UINT32 flags; -profiler_mark_start(PROFILER_TILEMAP_UPDATE); +g_profiler.start(PROFILER_TILEMAP_UPDATE); /* call the get info callback for the associated memory index */ memindex = tmap->logical_to_memory[logindex]; @@ -1353,7 +1353,7 @@ profiler_mark_start(PROFILER_TILEMAP_UPDATE); tmap->gfx_dirtyseq[tmap->tileinfo.gfxnum] = tmap->machine->gfx[tmap->tileinfo.gfxnum]->dirtyseq; } -profiler_mark_end(); +g_profiler.stop(); } |