Filters: use backend-independent code when possible