Fix mixed use of booleans in JPEGImageDecoder.cpp
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Mar 2014 10:21:27 +0000 (10:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Mar 2014 10:21:27 +0000 (10:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122412

Patch by Maurice van der Pot <griffon26@kfk4ever.com> on 2014-03-31
Reviewed by Darin Adler.

Trivial fix for compilation error; no new tests.

* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode):
(WebCore::fill_input_buffer):
Use TRUE/FALSE defined by libjpeg for libjpeg booleans

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166490 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

index 7eedc16..53c01d1 100644 (file)
@@ -1,3 +1,17 @@
+2014-03-31  Maurice van der Pot  <griffon26@kfk4ever.com>
+
+        Fix mixed use of booleans in JPEGImageDecoder.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=122412
+
+        Reviewed by Darin Adler.
+
+        Trivial fix for compilation error; no new tests.
+
+        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+        (WebCore::JPEGImageReader::decode):
+        (WebCore::fill_input_buffer):
+        Use TRUE/FALSE defined by libjpeg for libjpeg booleans
+
 2014-03-23  Zan Dobersek  <zdobersek@igalia.com>
 
         Move Source/WebCore/rendering/ code to std::unique_ptr
index c496502..da68b47 100644 (file)
@@ -333,7 +333,7 @@ public:
         switch (m_state) {
         case JPEG_HEADER:
             // Read file parameters with jpeg_read_header().
-            if (jpeg_read_header(&m_info, true) == JPEG_SUSPENDED)
+            if (jpeg_read_header(&m_info, TRUE) == JPEG_SUSPENDED)
                 return false; // I/O suspension.
 
             switch (m_info.jpeg_color_space) {
@@ -419,9 +419,9 @@ public:
             // of progressive JPEG.
             m_info.dct_method = dctMethod();
             m_info.dither_mode = ditherMode();
-            m_info.do_fancy_upsampling = doFancyUpsampling();
-            m_info.enable_2pass_quant = false;
-            m_info.do_block_smoothing = true;
+            m_info.do_fancy_upsampling = doFancyUpsampling() ? TRUE : FALSE;
+            m_info.enable_2pass_quant = FALSE;
+            m_info.do_block_smoothing = TRUE;
 
             // Start decompressor.
             if (!jpeg_start_decompress(&m_info))
@@ -572,7 +572,7 @@ boolean fill_input_buffer(j_decompress_ptr)
     // Our decode step always sets things up properly, so if this method is ever
     // called, then we have hit the end of the buffer.  A return value of false
     // indicates that we have no data to supply yet.
-    return false;
+    return FALSE;
 }
 
 void term_source(j_decompress_ptr jd)