summaryrefslogtreecommitdiff
path: root/src/sna/sna_trapezoids.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-04 11:43:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-04 12:54:27 +0100
commit2cdd57c804706bcf558d16d3370c1880ef482af1 (patch)
tree82e47790af6f68b3b1d67eee95d75d00fd0ae19b /src/sna/sna_trapezoids.c
parent1f7e20d812ef46fa0cba492e06a8f9f5a326d3c5 (diff)
sna/trapezoids: Some minor DBG to investigate threaded rendering
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids.c')
-rw-r--r--src/sna/sna_trapezoids.c16
1 files changed, 11 insertions, 5 deletions
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;