Further debug optimisation.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1638 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-12-01 16:29:19 +00:00
parent 973f7bad1e
commit 25294d4417
1 changed files with 5 additions and 0 deletions

View File

@ -1090,6 +1090,7 @@ void Image::Fill( Rgb colour, int density, const Polygon &polygon )
} }
qsort( global_edges, n_global_edges, sizeof(*global_edges), Edge::CompareYX ); qsort( global_edges, n_global_edges, sizeof(*global_edges), Edge::CompareYX );
#ifndef ZM_DBG_OFF
if ( zm_dbg_level >= 9 ) if ( zm_dbg_level >= 9 )
{ {
for ( int i = 0; i < n_global_edges; i++ ) for ( int i = 0; i < n_global_edges; i++ )
@ -1097,6 +1098,8 @@ void Image::Fill( Rgb colour, int density, const Polygon &polygon )
Debug( 9, ( "%d: min_y: %d, max_y:%d, min_x:%.2f, 1/m:%.2f", i, global_edges[i].min_y, global_edges[i].max_y, global_edges[i].min_x, global_edges[i]._1_m )); Debug( 9, ( "%d: min_y: %d, max_y:%d, min_x:%.2f, 1/m:%.2f", i, global_edges[i].min_y, global_edges[i].max_y, global_edges[i].min_x, global_edges[i]._1_m ));
} }
} }
#endif
int n_active_edges = 0; int n_active_edges = 0;
Edge active_edges[n_global_edges]; Edge active_edges[n_global_edges];
int y = global_edges[0].min_y; int y = global_edges[0].min_y;
@ -1121,6 +1124,7 @@ void Image::Fill( Rgb colour, int density, const Polygon &polygon )
} }
} }
qsort( active_edges, n_active_edges, sizeof(*active_edges), Edge::CompareX ); qsort( active_edges, n_active_edges, sizeof(*active_edges), Edge::CompareX );
#ifndef ZM_DBG_OFF
if ( zm_dbg_level >= 9 ) if ( zm_dbg_level >= 9 )
{ {
for ( int i = 0; i < n_active_edges; i++ ) for ( int i = 0; i < n_active_edges; i++ )
@ -1128,6 +1132,7 @@ void Image::Fill( Rgb colour, int density, const Polygon &polygon )
Debug( 9, ( "%d - %d: min_y: %d, max_y:%d, min_x:%.2f, 1/m:%.2f", y, i, active_edges[i].min_y, active_edges[i].max_y, active_edges[i].min_x, active_edges[i]._1_m )); Debug( 9, ( "%d - %d: min_y: %d, max_y:%d, min_x:%.2f, 1/m:%.2f", y, i, active_edges[i].min_y, active_edges[i].max_y, active_edges[i].min_x, active_edges[i]._1_m ));
} }
} }
#endif
if ( !(y%density) ) if ( !(y%density) )
{ {
//Debug( 9, ( "%d", y )); //Debug( 9, ( "%d", y ));