From 2cdd57c804706bcf558d16d3370c1880ef482af1 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 4 Aug 2013 11:43:54 +0100 Subject: sna/trapezoids: Some minor DBG to investigate threaded rendering Signed-off-by: Chris Wilson --- src/sna/sna_trapezoids.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/sna/sna_trapezoids.c') diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index feb1d40d..04c8448c 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -4123,15 +4123,15 @@ choose_span(struct sna_composite_spans_op *tmp, /* XXX An imprecise approximation */ if (maskFormat && !operator_is_bounded(tmp->base.op)) { span = tor_blt_span_mono_unbounded; - if (REGION_NUM_RECTS(clip) > 1) + if (clip->data) span = tor_blt_span_mono_unbounded_clipped; } else { span = tor_blt_span_mono; - if (REGION_NUM_RECTS(clip) > 1) + if (clip->data) span = tor_blt_span_mono_clipped; } } else { - if (REGION_NUM_RECTS(clip) > 1) + if (clip->data) span = tor_blt_span_clipped; else if (tmp->base.damage == NULL) span = tor_blt_span__no_damage; @@ -4485,13 +4485,18 @@ thread_choose_span(struct sna_composite_spans_op *tmp, { span_func_t span; - if (tmp->base.damage) + if (tmp->base.damage) { + DBG(("%s: damaged -> no thread support\n", __FUNCTION__)); return NULL; + } if (is_mono(dst, maskFormat)) { + DBG(("%s: mono rendering -> no thread support\n", __FUNCTION__)); return NULL; } else { - if (REGION_NUM_RECTS(clip) > 1) + assert(tmp->thread_boxes); + DBG(("%s: clipped? %d\n", __FUNCTION__, clip->data != NULL)); + if (clip->data) span = span_thread_clipped_box; else span = span_thread_box; @@ -4667,6 +4672,7 @@ trapezoid_span_converter(struct sna *sna, num_threads = sna_use_threads(extents.x2-extents.x1, extents.y2-extents.y1, 16); + DBG(("%s: using %d threads\n", __FUNCTION__, num_threads)); if (num_threads == 1) { struct tor tor; -- cgit v1.2.3