sna: Use the unlikely wedged() throughout

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-10-18 17:52:56 +01:00
parent 7a9c76e181
commit 1a43b2a46a
3 changed files with 13 additions and 13 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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;