Branch 'poppler-0.12' - poppler/CairoOutputDev.cc

View: New views
1 Messages — Rating Filter:   Alert me  

Branch 'poppler-0.12' - poppler/CairoOutputDev.cc

by Chris Wilson-31 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 poppler/CairoOutputDev.cc |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit c00e4f10cd214c105813448415630fec68e094ef
Author: Chris Wilson <chris@...>
Date:   Tue Aug 11 19:17:52 2009 +0100

    [cairo] Mark images dirty
   
    After directly manipulating the pixel values we need to mark the surface
    as dirty. This means that cairo will refresh any caches it may have taken
    of the surface will the new data.
    (cherry picked from commit 32ea667ec8f18311539123c7b80c7ab4767070cb)

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 19d1245..a19f42c 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -1243,6 +1243,7 @@ void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha,
 
       }
     }
+    cairo_surface_mark_dirty (source);
 
     /* setup the new mask pattern */
     mask = cairo_pattern_create_for_surface(source);
@@ -1359,6 +1360,7 @@ void CairoOutputDev::drawImageMaskRegular(GfxState *state, Object *ref, Stream *
     }
   }
 
+  cairo_surface_mark_dirty (image);
   pattern = cairo_pattern_create_for_surface (image);
   cairo_surface_destroy (image);
   if (cairo_pattern_status (pattern))
@@ -1617,6 +1619,7 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream
   }
   free(pixBuf);
 
+  cairo_surface_mark_dirty (image);
   pattern = cairo_pattern_create_for_surface (image);
   cairo_surface_destroy (image);
   if (cairo_pattern_status (pattern)) {
@@ -1732,6 +1735,7 @@ void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
   maskImgStr->close();
   delete maskImgStr;
 
+  cairo_surface_mark_dirty (maskImage);
   maskPattern = cairo_pattern_create_for_surface (maskImage);
   cairo_surface_destroy (maskImage);
   if (cairo_pattern_status (maskPattern))
@@ -1764,6 +1768,7 @@ void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
     colorMap->getRGBLine (pix, dest, width);
   }
 
+  cairo_surface_mark_dirty (image);
   pattern = cairo_pattern_create_for_surface (image);
   cairo_surface_destroy (image);
   if (cairo_pattern_status (pattern))
@@ -1852,6 +1857,7 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s
   maskImgStr->close();
   delete maskImgStr;
 
+  cairo_surface_mark_dirty (maskImage);
   maskPattern = cairo_pattern_create_for_surface (maskImage);
   cairo_surface_destroy (maskImage);
   if (cairo_pattern_status (maskPattern))
@@ -1884,6 +1890,7 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s
     colorMap->getRGBLine (pix, dest, width);
   }
 
+  cairo_surface_mark_dirty (image);
   pattern = cairo_pattern_create_for_surface (image);
   cairo_surface_destroy (image);
   if (cairo_pattern_status (pattern))
@@ -2028,6 +2035,7 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   }
   gfree(lookup);
 
+  cairo_surface_mark_dirty (image);
   pattern = cairo_pattern_create_for_surface (image);
   cairo_surface_destroy (image);
   if (cairo_pattern_status (pattern))
_______________________________________________
poppler mailing list
poppler@...
http://lists.freedesktop.org/mailman/listinfo/poppler