Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/642470fb74c4a3c9e5dd222a64a19da75b807537
...commit
http://git.netsurf-browser.org/netsurf.git/commit/642470fb74c4a3c9e5dd222a64a19da75b807537
...tree
http://git.netsurf-browser.org/netsurf.git/tree/642470fb74c4a3c9e5dd222a64a19da75b807537
The branch, master has been updated
via 642470fb74c4a3c9e5dd222a64a19da75b807537 (commit)
from 53a379ea45a3dd497c5471acc692addfe3f5297e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/642470fb74c4a3c9e5dd222a64a19da75b807537
commit 642470fb74c4a3c9e5dd222a64a19da75b807537
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Avoid two duplicate lines.
diff --git a/image/jpeg.c b/image/jpeg.c
index 92443bd..27d79bb 100644
--- a/image/jpeg.c
+++ b/image/jpeg.c
@@ -245,14 +245,16 @@ jpeg_cache_convert(struct content *c)
rowstride = bitmap_get_rowstride(bitmap);
do {
JSAMPROW scanlines[1];
-#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
- int i;
scanlines[0] = (JSAMPROW) (pixels +
rowstride * cinfo.output_scanline);
jpeg_read_scanlines(&cinfo, scanlines, 1);
- /* expand to RGBA */
+#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
+{
+ /* Missmatch between configured libjpeg pixel format and
+ * NetSurf pixel format. Convert to RGBA */
+ int i;
for (i = width - 1; 0 <= i; i--) {
int r = scanlines[0][i * RGB_PIXELSIZE + RGB_RED];
int g = scanlines[0][i * RGB_PIXELSIZE + RGB_GREEN];
@@ -262,11 +264,7 @@ jpeg_cache_convert(struct content *c)
scanlines[0][i * 4 + 2] = b;
scanlines[0][i * 4 + 3] = 0xff;
}
-#else
- scanlines[0] = (JSAMPROW) (pixels +
- rowstride * cinfo.output_scanline);
- jpeg_read_scanlines(&cinfo, scanlines, 1);
-
+}
#endif
} while (cinfo.output_scanline != cinfo.output_height);
bitmap_modified(bitmap);
-----------------------------------------------------------------------
Summary of changes:
image/jpeg.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/image/jpeg.c b/image/jpeg.c
index 92443bd..27d79bb 100644
--- a/image/jpeg.c
+++ b/image/jpeg.c
@@ -245,14 +245,16 @@ jpeg_cache_convert(struct content *c)
rowstride = bitmap_get_rowstride(bitmap);
do {
JSAMPROW scanlines[1];
-#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
- int i;
scanlines[0] = (JSAMPROW) (pixels +
rowstride * cinfo.output_scanline);
jpeg_read_scanlines(&cinfo, scanlines, 1);
- /* expand to RGBA */
+#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
+{
+ /* Missmatch between configured libjpeg pixel format and
+ * NetSurf pixel format. Convert to RGBA */
+ int i;
for (i = width - 1; 0 <= i; i--) {
int r = scanlines[0][i * RGB_PIXELSIZE + RGB_RED];
int g = scanlines[0][i * RGB_PIXELSIZE + RGB_GREEN];
@@ -262,11 +264,7 @@ jpeg_cache_convert(struct content *c)
scanlines[0][i * 4 + 2] = b;
scanlines[0][i * 4 + 3] = 0xff;
}
-#else
- scanlines[0] = (JSAMPROW) (pixels +
- rowstride * cinfo.output_scanline);
- jpeg_read_scanlines(&cinfo, scanlines, 1);
-
+}
#endif
} while (cinfo.output_scanline != cinfo.output_height);
bitmap_modified(bitmap);
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org