Hello community,

here is the log from the commit of package ghc-JuicyPixels for openSUSE:Factory 
checked in at 2015-12-09 19:52:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-JuicyPixels (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-JuicyPixels.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-JuicyPixels"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-JuicyPixels/ghc-JuicyPixels.changes  
2015-11-10 10:02:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-JuicyPixels.new/ghc-JuicyPixels.changes     
2015-12-09 22:16:50.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Dec  7 11:11:25 UTC 2015 - [email protected]
+
+- update to 3.2.6.4
+* Fix: Fixing unwanted sharing with createMutableImage due to
+        wrongly used INLINE pragma
+
+-------------------------------------------------------------------

Old:
----
  JuicyPixels-3.2.6.2.tar.gz

New:
----
  JuicyPixels-3.2.6.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-JuicyPixels.spec ++++++
--- /var/tmp/diff_new_pack.ZKVvAo/_old  2015-12-09 22:16:51.000000000 +0100
+++ /var/tmp/diff_new_pack.ZKVvAo/_new  2015-12-09 22:16:51.000000000 +0100
@@ -20,7 +20,7 @@
 # no useful debuginfo for Haskell packages without C sources
 %global debug_package %{nil}
 Name:           ghc-JuicyPixels
-Version:        3.2.6.2
+Version:        3.2.6.4
 Release:        0
 Summary:        Picture loading/serialization 
 License:        BSD-3-Clause

++++++ JuicyPixels-3.2.6.2.tar.gz -> JuicyPixels-3.2.6.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JuicyPixels-3.2.6.2/JuicyPixels.cabal 
new/JuicyPixels-3.2.6.4/JuicyPixels.cabal
--- old/JuicyPixels-3.2.6.2/JuicyPixels.cabal   2015-10-31 10:40:30.000000000 
+0100
+++ new/JuicyPixels-3.2.6.4/JuicyPixels.cabal   2015-12-02 22:38:14.000000000 
+0100
@@ -1,5 +1,5 @@
 Name:                JuicyPixels
-Version:             3.2.6.2
+Version:             3.2.6.4
 Synopsis:            Picture loading/serialization (in png, jpeg, bitmap, gif, 
tga, tiff and radiance)
 Description:
     
<<data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADABAMAAACg8nE0AAAAElBMVEUAAABJqDSTWEL/qyb///8AAABH/1GTAAAAAXRSTlMAQObYZgAAAN5JREFUeF7s1sEJgFAQxFBbsAV72v5bEVYWPwT/XDxmCsi7zvHXavYREBDI3XP2GgICqBBYuwIC+/rVayPUAyAg0HvIXBcQoDFDGnUBgWQQ2Bx3AYFaRoBpAQHWb3bt2ARgGAiCYFFuwf3X5HA/McgGJWI2FdykCv4aBYzmKwDwvl6NVmUAAK2vlwEALK7fo88GANB6HQsAAAAAAAAA7P94AQCzswEAAAAAAAAAAAAAAAAAAICzh4UAO4zWAYBfRutHA4Bn5C69JhowAMGoBaMWDG0wCkbBKBgFo2AUAACPmegUST/IJAAAAABJRU5ErkJggg==>>
@@ -28,7 +28,7 @@
 Source-Repository this
     Type:      git
     Location:  git://github.com/Twinside/Juicy.Pixels.git
-    Tag:       v3.2.6.2
+    Tag:       v3.2.6.4
 
 Flag Mmap
     Description: Enable the file loading via mmap (memory map)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JuicyPixels-3.2.6.2/changelog 
new/JuicyPixels-3.2.6.4/changelog
--- old/JuicyPixels-3.2.6.2/changelog   2015-10-31 10:40:30.000000000 +0100
+++ new/JuicyPixels-3.2.6.4/changelog   2015-12-02 22:38:14.000000000 +0100
@@ -1,11 +1,20 @@
 Change log
 ==========
 
+v3.2.6.3 December 2015
+----------------------
+ * Fix: previous broken bugfix.
+
+v3.2.6.3 November 2015
+----------------------
+ * Fix: Fixing unwanted sharing with createMutableImage due to
+               wrongly used INLINE pragma
+
 v3.2.6.2 November 2015
 ----------------------
  * Fix: Using minimal GIF version if outputing a single image.
 
-v3.2.6.1 AUgust 2015
+v3.2.6.1 August 2015
 --------------------
  * Fix: handling of negative height & width in bitmap format.
  * Fix: regression on Tiff parsing.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JuicyPixels-3.2.6.2/src/Codec/Picture/Types.hs 
new/JuicyPixels-3.2.6.4/src/Codec/Picture/Types.hs
--- old/JuicyPixels-3.2.6.2/src/Codec/Picture/Types.hs  2015-10-31 
10:40:29.000000000 +0100
+++ new/JuicyPixels-3.2.6.4/src/Codec/Picture/Types.hs  2015-12-02 
22:38:14.000000000 +0100
@@ -309,6 +309,7 @@
 -- The source image shouldn't be used after this operation.
 unsafeThawImage :: (Storable (PixelBaseComponent px), PrimMonad m)
                 => Image px -> m (MutableImage (PrimState m) px)
+{-# NOINLINE unsafeThawImage #-}
 unsafeThawImage (Image w h d) = MutableImage w h `liftM` V.unsafeThaw d
 
 -- | `O(1)` Unsafe convert a mutable image to an immutable one without copying.
@@ -323,9 +324,8 @@
                    -> Int -- ^ Height
                    -> px  -- ^ Background color
                    -> m (MutableImage (PrimState m) px)
-{-# INLINE createMutableImage #-}
 createMutableImage width height background =
-   unsafeThawImage $ generateImage (\_ _ -> background) width height
+   generateMutableImage (\_ _ -> background) width height
 
 -- | Create a mutable image with garbage as content. All data
 -- is uninitialized.
@@ -733,6 +733,26 @@
     convertImage :: Image a -> Image b
     convertImage = pixelMap convertPixel
 
+generateMutableImage :: forall m px. (Pixel px, PrimMonad m)
+                     => (Int -> Int -> px)  -- ^ Generating function, with `x` 
and `y` params.
+                     -> Int        -- ^ Width in pixels
+                     -> Int        -- ^ Height in pixels
+                     -> m (MutableImage (PrimState m) px)
+{-# INLINE generateMutableImage #-}
+generateMutableImage f w h = MutableImage w h <$> generated where
+  compCount = componentCount (undefined :: px)
+
+  generated = do
+    arr <- M.new (w * h * compCount)
+    let lineGenerator _ !y | y >= h = return ()
+        lineGenerator !lineIdx y = column lineIdx 0
+          where column !idx !x | x >= w = lineGenerator idx $ y + 1
+                column idx x = do
+                    unsafeWritePixel arr idx $ f x y
+                    column (idx + compCount) $ x + 1
+    lineGenerator 0 0
+    return arr
+
 -- | Create an image given a function to generate pixels.
 -- The function will receive values from 0 to width-1 for the x parameter
 -- and 0 to height-1 for the y parameter. The coordinates 0,0 are the upper
@@ -744,25 +764,15 @@
 -- > imageCreator path = writePng path $ generateImage pixelRenderer 250 300
 -- >    where pixelRenderer x y = PixelRGB8 (fromIntegral x) (fromIntegral y) 
128
 --
-generateImage :: forall a. (Pixel a)
-              => (Int -> Int -> a)  -- ^ Generating function, with `x` and `y` 
params.
+generateImage :: forall px. (Pixel px)
+              => (Int -> Int -> px)  -- ^ Generating function, with `x` and 
`y` params.
               -> Int        -- ^ Width in pixels
               -> Int        -- ^ Height in pixels
-              -> Image a
+              -> Image px
 {-# INLINE generateImage #-}
-generateImage f w h = Image { imageWidth = w, imageHeight = h, imageData = 
generated }
-  where compCount = componentCount (undefined :: a)
-        generated = runST $ do
-            arr <- M.new (w * h * compCount)
-            let lineGenerator _ !y | y >= h = return ()
-                lineGenerator !lineIdx y = column lineIdx 0
-                  where column !idx !x | x >= w = lineGenerator idx $ y + 1
-                        column idx x = do
-                            unsafeWritePixel arr idx $ f x y
-                            column (idx + compCount) $ x + 1
-
-            lineGenerator 0 0
-            V.unsafeFreeze arr
+generateImage f w h = runST img where
+  img :: ST s (Image px)
+  img = generateMutableImage f w h >>= unsafeFreezeImage
 
 -- | Create an image using a monadic initializer function.
 -- The function will receive values from 0 to width-1 for the x parameter


Reply via email to