From edd062df3b09f70915c23cd7b0fe3788b62beb0e Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Tue, 30 Jun 2009 11:39:30 +0200 Subject: [PATCH] [pdf] Do not fill the surface before rendering The surface is guaranteed to be cleared --- backend/pdf/ev-poppler.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 6ba82a6d..0a073ca0 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -487,17 +487,11 @@ pdf_page_render (PopplerPage *page, #ifdef HAVE_POPPLER_PAGE_RENDER cairo_t *cr; - cairo_pattern_t *pattern; surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); cr = cairo_create (surface); - cairo_save (cr); - cairo_set_source_rgba (cr, 1., 1., 1., 0); - cairo_paint (cr); - cairo_restore (cr); - switch (rc->rotation) { case 90: cairo_translate (cr, width, 0); @@ -515,12 +509,10 @@ pdf_page_render (PopplerPage *page, cairo_rotate (cr, rc->rotation * G_PI / 180.0); poppler_page_render (page, cr); - pattern = cairo_pattern_create_rgb (1., 1., 1.); cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER); - cairo_set_source (cr, pattern); + cairo_set_source_rgb (cr, 1., 1., 1.); cairo_paint (cr); - cairo_pattern_destroy (pattern); cairo_destroy (cr); #else /* HAVE_POPPLER_PAGE_RENDER */ GdkPixbuf *pixbuf; -- 2.43.5