summaryrefslogtreecommitdiff
path: root/src/sna/sna_composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-04 16:33:34 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-04 20:07:45 +0000
commitc107b90a44abb45c837ff8924939872be5b490eb (patch)
treee42e3d00f2fe70cc6d7a61093a12ee279c63ca7b /src/sna/sna_composite.c
parent4baa2806bc0f51e7576b769ca6750deb3821c4d3 (diff)
sna/gen6: Reduce PictOpClear to PictOpSrc (with blending disabled)
The advantage of PictOpSrc is that it writes its results directly to memory bypassing the blend unit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_composite.c')
-rw-r--r--src/sna/sna_composite.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 0faad844..8eb0c942 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -792,6 +792,21 @@ sna_composite_rectangles(CARD8 op,
}
} else
sna_damage_add(&priv->gpu_damage, &region);
+ } else if (op <= PictOpSrc &&
+ region.data == NULL &&
+ region.extents.x2 - region.extents.x1 == pixmap->drawable.width &&
+ region.extents.y2 - region.extents.y1 == pixmap->drawable.height) {
+ priv->clear = true;
+ priv->clear_color = 0;
+ if (op == PictOpSrc)
+ sna_get_pixel_from_rgba(&priv->clear_color,
+ color->red,
+ color->green,
+ color->blue,
+ color->alpha,
+ dst->format);
+ DBG(("%s: marking clear [%08x]\n",
+ __FUNCTION__, priv->clear_color));
}
goto done;