remove some old sanity-checks
regions can have null generate now
This commit is contained in:
parent
71a90997ab
commit
18c12fd66d
@ -364,28 +364,6 @@ vips_region_summary( VipsObject *object, VipsBuf *buf )
|
|||||||
VIPS_OBJECT_CLASS( vips_region_parent_class )->summary( object, buf );
|
VIPS_OBJECT_CLASS( vips_region_parent_class )->summary( object, buf );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
vips_region_sanity( VipsObject *object, VipsBuf *buf )
|
|
||||||
{
|
|
||||||
VipsRegion *region = VIPS_REGION( object );
|
|
||||||
|
|
||||||
(void) vips_object_sanity( VIPS_OBJECT( region->im ) );
|
|
||||||
|
|
||||||
switch( region->im->dtype ) {
|
|
||||||
case VIPS_IMAGE_PARTIAL:
|
|
||||||
/* Start and stop can be NULL, but not generate.
|
|
||||||
*/
|
|
||||||
if( !region->im->generate_fn )
|
|
||||||
vips_buf_appends( buf, "generate NULL in partial\n" );
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
VIPS_OBJECT_CLASS( vips_region_parent_class )->sanity( object, buf );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If a region is being created in one thread (eg. the main thread) and then
|
/* If a region is being created in one thread (eg. the main thread) and then
|
||||||
* used in another (eg. a worker thread), the new thread needs to tell VIPS
|
* used in another (eg. a worker thread), the new thread needs to tell VIPS
|
||||||
* to stop sanity g_assert() fails. The previous owner needs to
|
* to stop sanity g_assert() fails. The previous owner needs to
|
||||||
@ -491,7 +469,6 @@ vips_region_class_init( VipsRegionClass *class )
|
|||||||
|
|
||||||
vobject_class->summary = vips_region_summary;
|
vobject_class->summary = vips_region_summary;
|
||||||
vobject_class->dump = vips_region_dump;
|
vobject_class->dump = vips_region_dump;
|
||||||
vobject_class->sanity = vips_region_sanity;
|
|
||||||
vobject_class->build = vips_region_build;
|
vobject_class->build = vips_region_build;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
@ -6,7 +7,6 @@ import re
|
|||||||
import cairo
|
import cairo
|
||||||
from io import open
|
from io import open
|
||||||
|
|
||||||
|
|
||||||
class ReadFile:
|
class ReadFile:
|
||||||
def __init__(self, filename):
|
def __init__(self, filename):
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
@ -212,7 +212,8 @@ for thread in threads:
|
|||||||
unkn_percent = 100 - 100 * (thread.work + thread.wait) / thread.alive
|
unkn_percent = 100 - 100 * (thread.work + thread.wait) / thread.alive
|
||||||
|
|
||||||
print('%13s\t%6.2g\t' % (thread.thread_name, thread.alive), end=' ')
|
print('%13s\t%6.2g\t' % (thread.thread_name, thread.alive), end=' ')
|
||||||
print('%.3g\t%.3g\t%.3g\t' % (wait_percent, work_percent, unkn_percent), end=' ')
|
print('%.3g\t%.3g\t%.3g\t' %
|
||||||
|
(wait_percent, work_percent, unkn_percent), end=' ')
|
||||||
print('%.3g\t' % (thread.mem / (1024 * 1024)), end=' ')
|
print('%.3g\t' % (thread.mem / (1024 * 1024)), end=' ')
|
||||||
print('%.3g\t' % (thread.peak_mem / (1024 * 1024)))
|
print('%.3g\t' % (thread.peak_mem / (1024 * 1024)))
|
||||||
|
|
||||||
@ -302,7 +303,8 @@ for thread in threads:
|
|||||||
if gate_positions[gate_name] != gate_y:
|
if gate_positions[gate_name] != gate_y:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if gates_overlap(thread.other_events, event.gate_name, gate_name):
|
if gates_overlap(thread.other_events,
|
||||||
|
event.gate_name, gate_name):
|
||||||
found_overlap = True
|
found_overlap = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user