copyarea: Cleanup the error handling logic.
Should use ok rather than mixed ok or ret. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
b4a499b7db
commit
016995334e
|
@ -398,8 +398,7 @@ _glamor_copy_n_to_n(DrawablePtr src,
|
||||||
RegionRec region;
|
RegionRec region;
|
||||||
ScreenPtr screen;
|
ScreenPtr screen;
|
||||||
int src_x_off, src_y_off, dst_x_off, dst_y_off;
|
int src_x_off, src_y_off, dst_x_off, dst_y_off;
|
||||||
Bool ret = FALSE;
|
Bool ok = TRUE;
|
||||||
int ok = TRUE;
|
|
||||||
int force_clip = 0;
|
int force_clip = 0;
|
||||||
|
|
||||||
if (nbox == 0)
|
if (nbox == 0)
|
||||||
|
@ -423,10 +422,11 @@ _glamor_copy_n_to_n(DrawablePtr src,
|
||||||
|
|
||||||
if (gc) {
|
if (gc) {
|
||||||
if (!glamor_set_planemask(dst_pixmap, gc->planemask))
|
if (!glamor_set_planemask(dst_pixmap, gc->planemask))
|
||||||
goto fail;
|
goto fall_back;
|
||||||
dispatch = glamor_get_dispatch(glamor_priv);
|
dispatch = glamor_get_dispatch(glamor_priv);
|
||||||
if (!glamor_set_alu(dispatch, gc->alu)) {
|
if (!glamor_set_alu(dispatch, gc->alu)) {
|
||||||
glamor_put_dispatch(glamor_priv);
|
glamor_put_dispatch(glamor_priv);
|
||||||
|
ok = FALSE;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
glamor_put_dispatch(glamor_priv);
|
glamor_put_dispatch(glamor_priv);
|
||||||
|
@ -499,8 +499,10 @@ _glamor_copy_n_to_n(DrawablePtr src,
|
||||||
* it. It's a little hacky, but avoid extra copy. */
|
* it. It's a little hacky, but avoid extra copy. */
|
||||||
temp_source_pixmap = glamor_create_pixmap(src->pScreen, 0, 0,
|
temp_source_pixmap = glamor_create_pixmap(src->pScreen, 0, 0,
|
||||||
src->depth, 0);
|
src->depth, 0);
|
||||||
if (!temp_source_pixmap)
|
if (!temp_source_pixmap) {
|
||||||
|
ok = FALSE;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
src->pScreen->ModifyPixmapHeader(temp_source_pixmap,
|
src->pScreen->ModifyPixmapHeader(temp_source_pixmap,
|
||||||
src_pixmap->drawable.width,
|
src_pixmap->drawable.width,
|
||||||
src_pixmap->drawable.height,
|
src_pixmap->drawable.height,
|
||||||
|
@ -619,12 +621,12 @@ fall_back:
|
||||||
}
|
}
|
||||||
glamor_finish_access(dst, GLAMOR_ACCESS_RW);
|
glamor_finish_access(dst, GLAMOR_ACCESS_RW);
|
||||||
}
|
}
|
||||||
ret = TRUE;
|
ok = TRUE;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
glamor_clear_delayed_fallbacks(src->pScreen);
|
glamor_clear_delayed_fallbacks(src->pScreen);
|
||||||
glamor_clear_delayed_fallbacks(dst->pScreen);
|
glamor_clear_delayed_fallbacks(dst->pScreen);
|
||||||
return ret;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionPtr
|
RegionPtr
|
||||||
|
|
Loading…
Reference in New Issue