diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2016-06-19 11:07:09 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2016-06-19 11:30:16 +0930 |
commit | 5f939d683a8978cdfdb65a3471296bf9e5940055 (patch) | |
tree | eb5c3e439eb77d06466b175753b127e903253d5e /utils/pdftocairo.cc | |
parent | 5165c1a59332a0bc9da60a1a8d53dace039aae32 (diff) |
pdftocairo: revert the use of groups for blending into white page
This was added in 853e949 but has since been found to cause
regressions eg the test case in bug 63587.
Diffstat (limited to 'utils/pdftocairo.cc')
-rw-r--r-- | utils/pdftocairo.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/utils/pdftocairo.cc b/utils/pdftocairo.cc index 906a5a17..29976839 100644 --- a/utils/pdftocairo.cc +++ b/utils/pdftocairo.cc @@ -641,12 +641,6 @@ static void renderPage(PDFDoc *doc, CairoOutputDev *cairoOut, int pg, cr = cairo_create(surface); - if (!printing && !transp) { - cairo_set_source_rgb (cr, 1,1,1); - cairo_paint (cr); - cairo_push_group_with_content (cr, CAIRO_CONTENT_COLOR_ALPHA); - } - cairoOut->setCairo(cr); cairoOut->setPrinting(printing); cairoOut->setAntialias(antialiasEnum); @@ -680,9 +674,13 @@ static void renderPage(PDFDoc *doc, CairoOutputDev *cairoOut, int pg, cairo_restore(cr); cairoOut->setCairo(NULL); + // Blend onto white page if (!printing && !transp) { - cairo_pop_group_to_source (cr); - cairo_paint (cr); + cairo_save(cr); + cairo_set_operator(cr, CAIRO_OPERATOR_DEST_OVER); + cairo_set_source_rgb(cr, 1, 1, 1); + cairo_paint(cr); + cairo_restore(cr); } status = cairo_status(cr); |