public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-libs/webkit-gtk/files: webkit-gtk-1.2.7-libpng15.patch
@ 2011-04-04 20:48 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 2+ messages in thread
From: Samuli Suominen (ssuominen) @ 2011-04-04 20:48 UTC (permalink / raw
  To: gentoo-commits

ssuominen    11/04/04 20:48:14

  Added:                webkit-gtk-1.2.7-libpng15.patch
  Log:
  Fix building with media-libs/libpng >= 1.5 wrt #355015 by Lars Wendler.
  
  (Portage version: 2.2.0_alpha29/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch?rev=1.1&content-type=text/plain

Index: webkit-gtk-1.2.7-libpng15.patch
===================================================================
--- WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
+++ WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
@@ -242,9 +242,9 @@
     png_structp png = m_reader->pngPtr();
     png_infop info = m_reader->infoPtr();
-    png_uint_32 width = png->width;
-    png_uint_32 height = png->height;
+    png_uint_32 width = png_get_image_width(png, info);
+    png_uint_32 height = png_get_image_height(png, info);
     
     // Protect against large images.
-    if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
+    if (width > cMaxPNGSize || height > cMaxPNGSize) {
         longjmp(JMPBUF(png), 1);
         return;
@@ -319,7 +319,12 @@
 
     if (m_reader->decodingSizeOnly()) {
-        // If we only needed the size, halt the reader.     
+        // If we only needed the size, halt the reader.
+#if defined(PNG_LIBPNG_VER_MAJOR) && defined(PNG_LIBPNG_VER_MINOR) && (PNG_LIBPNG_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 5))
+        // '0' argument to png_process_data_pause means: Do not cache unprocessed data.
+        m_reader->setReadOffset(m_reader->currentBufferSize() - png_process_data_pause(png, 0));
+#else
         m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size);
         png->buffer_size = 0;
+#endif
     }
 }
@@ -344,5 +349,5 @@
         buffer.setOriginalFrameRect(IntRect(IntPoint(), size()));
 
-        if (m_reader->pngPtr()->interlaced)
+        if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr()) != PNG_INTERLACE_NONE)
             m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height());
     }






^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in net-libs/webkit-gtk/files: webkit-gtk-1.2.7-libpng15.patch
@ 2011-04-05 17:00 Christoph Mende (angelos)
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Mende (angelos) @ 2011-04-05 17:00 UTC (permalink / raw
  To: gentoo-commits

angelos     11/04/05 17:00:11

  Modified:             webkit-gtk-1.2.7-libpng15.patch
  Log:
  Converted libpng15 patch from DOS to Unix
  
  (Portage version: 2.2.0_alpha29/cvs/Linux x86_64)

Revision  Changes    Path
1.2                  net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch?r1=1.1&r2=1.2

Index: webkit-gtk-1.2.7-libpng15.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/files/webkit-gtk-1.2.7-libpng15.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- webkit-gtk-1.2.7-libpng15.patch	4 Apr 2011 20:48:14 -0000	1.1
+++ webkit-gtk-1.2.7-libpng15.patch	5 Apr 2011 17:00:11 -0000	1.2
@@ -1,36 +1,36 @@
---- WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
-+++ WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
-@@ -242,9 +242,9 @@
-     png_structp png = m_reader->pngPtr();
-     png_infop info = m_reader->infoPtr();
--    png_uint_32 width = png->width;
--    png_uint_32 height = png->height;
-+    png_uint_32 width = png_get_image_width(png, info);
-+    png_uint_32 height = png_get_image_height(png, info);
-     
-     // Protect against large images.
--    if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
-+    if (width > cMaxPNGSize || height > cMaxPNGSize) {
-         longjmp(JMPBUF(png), 1);
-         return;
-@@ -319,7 +319,12 @@
- 
-     if (m_reader->decodingSizeOnly()) {
--        // If we only needed the size, halt the reader.     
-+        // If we only needed the size, halt the reader.
-+#if defined(PNG_LIBPNG_VER_MAJOR) && defined(PNG_LIBPNG_VER_MINOR) && (PNG_LIBPNG_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 5))
-+        // '0' argument to png_process_data_pause means: Do not cache unprocessed data.
-+        m_reader->setReadOffset(m_reader->currentBufferSize() - png_process_data_pause(png, 0));
-+#else
-         m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size);
-         png->buffer_size = 0;
-+#endif
-     }
- }
-@@ -344,5 +349,5 @@
-         buffer.setOriginalFrameRect(IntRect(IntPoint(), size()));
- 
--        if (m_reader->pngPtr()->interlaced)
-+        if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr()) != PNG_INTERLACE_NONE)
-             m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height());
-     }
+--- WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
++++ WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
+@@ -242,9 +242,9 @@
+     png_structp png = m_reader->pngPtr();
+     png_infop info = m_reader->infoPtr();
+-    png_uint_32 width = png->width;
+-    png_uint_32 height = png->height;
++    png_uint_32 width = png_get_image_width(png, info);
++    png_uint_32 height = png_get_image_height(png, info);
+     
+     // Protect against large images.
+-    if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
++    if (width > cMaxPNGSize || height > cMaxPNGSize) {
+         longjmp(JMPBUF(png), 1);
+         return;
+@@ -319,7 +319,12 @@
+ 
+     if (m_reader->decodingSizeOnly()) {
+-        // If we only needed the size, halt the reader.     
++        // If we only needed the size, halt the reader.
++#if defined(PNG_LIBPNG_VER_MAJOR) && defined(PNG_LIBPNG_VER_MINOR) && (PNG_LIBPNG_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 5))
++        // '0' argument to png_process_data_pause means: Do not cache unprocessed data.
++        m_reader->setReadOffset(m_reader->currentBufferSize() - png_process_data_pause(png, 0));
++#else
+         m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size);
+         png->buffer_size = 0;
++#endif
+     }
+ }
+@@ -344,5 +349,5 @@
+         buffer.setOriginalFrameRect(IntRect(IntPoint(), size()));
+ 
+-        if (m_reader->pngPtr()->interlaced)
++        if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr()) != PNG_INTERLACE_NONE)
+             m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height());
+     }






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-05 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-05 17:00 [gentoo-commits] gentoo-x86 commit in net-libs/webkit-gtk/files: webkit-gtk-1.2.7-libpng15.patch Christoph Mende (angelos)
  -- strict thread matches above, loose matches on Subject: below --
2011-04-04 20:48 Samuli Suominen (ssuominen)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox