summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-10-18 17:52:56 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-19 13:11:24 +0100
commit1a43b2a46a67fdea215719c4446224c9d2e26a20 (patch)
tree935b1f407efbbf0da62733951fffe103f7724bb6
parent7a9c76e1812d106fedf160c959e6e502998e4ce8 (diff)
sna: Use the unlikely wedged() throughout
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c20
-rw-r--r--src/sna/sna_composite.c4
-rw-r--r--src/sna/sna_trapezoids.c2
3 files changed, 13 insertions, 13 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 6101fb69..201a92a3 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -842,7 +842,7 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap)
DBG(("%s: CPU damage? %d\n", __FUNCTION__, priv->cpu_damage != NULL));
if (priv->gpu_bo == NULL) {
- if (!sna->kgem.wedged)
+ if (!wedged(sna))
priv->gpu_bo =
kgem_create_2d(&sna->kgem,
pixmap->drawable.width,
@@ -1687,7 +1687,7 @@ sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc,
DBG(("%s: src=(%d, %d)x(%d, %d) -> dst=(%d, %d)\n",
__FUNCTION__, src_x, src_y, width, height, dst_x, dst_y));
- if (sna->kgem.wedged || !PM_IS_SOLID(dst, gc->planemask)) {
+ if (wedged(sna) || !PM_IS_SOLID(dst, gc->planemask)) {
BoxRec box;
RegionRec region;
@@ -2197,7 +2197,7 @@ sna_poly_point(DrawablePtr drawable, GCPtr gc,
if (FORCE_FALLBACK)
goto fallback;
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
@@ -2418,7 +2418,7 @@ sna_poly_line(DrawablePtr drawable, GCPtr gc,
if (FORCE_FALLBACK)
goto fallback;
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
@@ -2724,7 +2724,7 @@ sna_poly_segment(DrawablePtr drawable, GCPtr gc, int n, xSegment *seg)
if (FORCE_FALLBACK)
goto fallback;
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
@@ -2881,7 +2881,7 @@ sna_poly_arc(DrawablePtr drawable, GCPtr gc, int n, xArc *arc)
if (FORCE_FALLBACK)
goto fallback;
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
@@ -3319,7 +3319,7 @@ sna_poly_fill_rect(DrawablePtr draw, GCPtr gc, int n, xRectangle *rect)
if (FORCE_FALLBACK)
goto fallback;
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
@@ -3616,7 +3616,7 @@ sna_image_glyph(DrawablePtr drawable, GCPtr gc,
if (FORCE_FALLBACK)
goto fallback;
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
@@ -3672,7 +3672,7 @@ sna_poly_glyph(DrawablePtr drawable, GCPtr gc,
if (FORCE_FALLBACK)
goto fallback;
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
@@ -3858,7 +3858,7 @@ sna_copy_window(WindowPtr win, DDXPointRec origin, RegionPtr src)
DBG(("%s origin=(%d, %d)\n", __FUNCTION__, origin.x, origin.y));
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
sna_pixmap_move_to_cpu(pixmap, true);
fbCopyWindow(win, origin, src);
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index e0b1ca39..3962d759 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -434,7 +434,7 @@ sna_composite(CARD8 op,
width, height))
return;
- if (sna->kgem.wedged) {
+ if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
@@ -641,7 +641,7 @@ sna_composite_rectangles(CARD8 op,
RegionExtents(&region)->x1, RegionExtents(&region)->y1,
RegionExtents(&region)->x2, RegionExtents(&region)->y2));
- if (sna->kgem.wedged)
+ if (wedged(sna))
goto fallback;
if (dst->alphaMap) {
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index 9801121e..80b47336 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -3010,7 +3010,7 @@ sna_composite_trapezoids(CARD8 op,
if (NO_ACCEL)
goto fallback;
- if (sna->kgem.wedged || !sna->have_render) {
+ if (wedged(sna) || !sna->have_render) {
DBG(("%s: fallback -- wedged=%d, have_render=%d\n",
__FUNCTION__, sna->kgem.wedged, sna->have_render));
goto fallback;