diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index d417c5577..2c3fa4b41 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -2440,14 +2440,8 @@ _cairo_pdf_surface_stroke (void *abstract_surface, pdf_path_info_t info; cairo_status_t status; - if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { - /* XXX: Does PDF provide a way we can preserve this hint? For now, - * this will trigger a fallback. */ - if (antialias == CAIRO_ANTIALIAS_NONE) - return CAIRO_INT_STATUS_UNSUPPORTED; - + if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) return _analyze_operation (surface, op, source); - } assert (_operation_supported (surface, op, source)); @@ -2495,14 +2489,8 @@ _cairo_pdf_surface_fill (void *abstract_surface, cairo_status_t status; pdf_path_info_t info; - if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { - /* XXX: Does PDF provide a way we can preserve this hint? For now, - * this will trigger a fallback. */ - if (antialias == CAIRO_ANTIALIAS_NONE) - return CAIRO_INT_STATUS_UNSUPPORTED; - + if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) return _analyze_operation (surface, op, source); - } assert (_operation_supported (surface, op, source)); diff --git a/test/cairo-test.c b/test/cairo-test.c index b99071873..e78452850 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -1222,6 +1222,14 @@ cleanup_ps (void *closure) #if CAIRO_HAS_PDF_SURFACE && CAIRO_CAN_TEST_PDF_SURFACE #include "cairo-pdf.h" +static const char *pdf_ignored_tests[] = { + /* We can't match the results of tests that depend on + * CAIRO_ANTIALIAS_NONE, (nor do we care). */ + "rectangle-rounding-error", + "unantialiased-shapes", + NULL +}; + cairo_user_data_key_t pdf_closure_key; typedef struct _pdf_target_closure @@ -1241,8 +1249,13 @@ create_pdf_surface (cairo_test_t *test, int height = test->height; pdf_target_closure_t *ptc; cairo_surface_t *surface; + int i; - /* Sanitizie back to a real cairo_content_t value. */ + for (i = 0; pdf_ignored_tests[i] != NULL; i++) + if (strcmp (test->name, pdf_ignored_tests[i]) == 0) + return NULL; + + /* Sanitize back to a real cairo_content_t value. */ if (content == CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED) content = CAIRO_CONTENT_COLOR_ALPHA;