summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libpng/pngtrans.c
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-08-31 13:10:18 +0200
committerLiang Qi <liang.qi@qt.io>2017-08-31 14:31:31 +0200
commit112a4af10741409b3d8503cb77852a777b607ce0 (patch)
treefa99f0f37fc1505522fe9368e95484c7732ccda8 /src/3rdparty/libpng/pngtrans.c
parent29ef0d2bccd1874e20de94485ee05777c3a95c5d (diff)
parente938150412d22e61926fe16791158805b71268bb (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
Diffstat (limited to 'src/3rdparty/libpng/pngtrans.c')
-rw-r--r--src/3rdparty/libpng/pngtrans.c38
1 files changed, 26 insertions, 12 deletions
diff --git a/src/3rdparty/libpng/pngtrans.c b/src/3rdparty/libpng/pngtrans.c
index da7413fb80..326ac33f0e 100644
--- a/src/3rdparty/libpng/pngtrans.c
+++ b/src/3rdparty/libpng/pngtrans.c
@@ -1,8 +1,8 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * Last changed in libpng 1.6.26 [October 20, 2016]
- * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.30 [June 28, 2017]
+ * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -514,11 +514,15 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
if (at_start != 0) /* Skip initial filler */
++sp;
else /* Skip initial channel and, for sp, the filler */
- sp += 2, ++dp;
+ {
+ sp += 2; ++dp;
+ }
/* For a 1 pixel wide image there is nothing to do */
while (sp < ep)
- *dp++ = *sp, sp += 2;
+ {
+ *dp++ = *sp; sp += 2;
+ }
row_info->pixel_depth = 8;
}
@@ -528,10 +532,14 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
if (at_start != 0) /* Skip initial filler */
sp += 2;
else /* Skip initial channel and, for sp, the filler */
- sp += 4, dp += 2;
+ {
+ sp += 4; dp += 2;
+ }
while (sp < ep)
- *dp++ = *sp++, *dp++ = *sp, sp += 3;
+ {
+ *dp++ = *sp++; *dp++ = *sp; sp += 3;
+ }
row_info->pixel_depth = 16;
}
@@ -554,11 +562,15 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
if (at_start != 0) /* Skip initial filler */
++sp;
else /* Skip initial channels and, for sp, the filler */
- sp += 4, dp += 3;
+ {
+ sp += 4; dp += 3;
+ }
/* Note that the loop adds 3 to dp and 4 to sp each time. */
while (sp < ep)
- *dp++ = *sp++, *dp++ = *sp++, *dp++ = *sp, sp += 2;
+ {
+ *dp++ = *sp++; *dp++ = *sp++; *dp++ = *sp; sp += 2;
+ }
row_info->pixel_depth = 24;
}
@@ -568,14 +580,16 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
if (at_start != 0) /* Skip initial filler */
sp += 2;
else /* Skip initial channels and, for sp, the filler */
- sp += 8, dp += 6;
+ {
+ sp += 8; dp += 6;
+ }
while (sp < ep)
{
/* Copy 6 bytes, skip 2 */
- *dp++ = *sp++, *dp++ = *sp++;
- *dp++ = *sp++, *dp++ = *sp++;
- *dp++ = *sp++, *dp++ = *sp, sp += 3;
+ *dp++ = *sp++; *dp++ = *sp++;
+ *dp++ = *sp++; *dp++ = *sp++;
+ *dp++ = *sp++; *dp++ = *sp; sp += 3;
}
row_info->pixel_depth = 48;