diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-03 14:12:50 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-03 14:12:50 +0100 |
commit | 47c76bb9680eee89d1cef86058782a7073ca4a47 (patch) | |
tree | 019eadd1bdd7390c379474f0676fa152fba86cdb /src | |
parent | 3e770f09dbe76287293fea0a8a1f231885aa1c1f (diff) |
sna/gen7: Tidy detection of unbounded render op
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/gen7_render.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 1f59eb37..376556af 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2430,10 +2430,11 @@ gen7_composite_set_target(struct sna *sna, op->dst.pixmap = get_drawable_pixmap(dst->pDrawable); op->dst.format = dst->format; - op->dst.width = op->dst.pixmap->drawable.width; + op->dst.width = op->dst.pixmap->drawable.width; op->dst.height = op->dst.pixmap->drawable.height; - if (w && h) { + if (w | h) { + assert(w && h); box.x1 = x; box.y1 = y; box.x2 = x + w; @@ -2441,9 +2442,9 @@ gen7_composite_set_target(struct sna *sna, } else sna_render_picture_extents(dst, &box); - op->dst.bo = sna_drawable_use_bo (dst->pDrawable, - PREFER_GPU | FORCE_GPU | RENDER_GPU, - &box, &op->damage); + op->dst.bo = sna_drawable_use_bo(dst->pDrawable, + PREFER_GPU | FORCE_GPU | RENDER_GPU, + &box, &op->damage); if (op->dst.bo == NULL) return false; |