Changeset 113243 in webkit


Ignore:
Timestamp:
Apr 4, 2012 2:48:32 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Disable fancy upsampling and dithering for decoding jpeg on android
https://bugs.webkit.org/show_bug.cgi?id=83196

Patch by Min Qin <qinmin@google.com> on 2012-04-04
Reviewed by Kenneth Russell.

Dithering and fancy upsampling are currently disabled for chrome on android.
This gives us about 20% performance improvement.
Since the screen of mobile devices is small, impact on image quality is limited.
This change does not introduce any changes on other platforms.

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(ditherMode):
(doFancyUpsampling):
(WebCore::JPEGImageReader::decode):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r113241 r113243  
     12012-04-04  Min Qin  <qinmin@google.com>
     2
     3        Disable fancy upsampling and dithering for decoding jpeg on android
     4        https://bugs.webkit.org/show_bug.cgi?id=83196
     5
     6        Reviewed by Kenneth Russell.
     7
     8        Dithering and fancy upsampling are currently disabled for chrome on android.
     9        This gives us about 20% performance improvement.
     10        Since the screen of mobile devices is small, impact on image quality is limited.
     11        This change does not introduce any changes on other platforms.
     12
     13        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
     14        (ditherMode):
     15        (doFancyUpsampling):
     16        (WebCore::JPEGImageReader::decode):
     17
    1182012-04-04  Daniel Sievers  <sievers@chromium.org>
    219
  • trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

    r112493 r113243  
    8484#endif
    8585
     86#if OS(ANDROID)
     87inline J_DITHER_MODE ditherMode() { return JDITHER_NONE; }
     88inline bool doFancyUpsampling() { return false; }
     89#else
     90inline J_DITHER_MODE ditherMode() { return JDITHER_FS; }
     91inline bool doFancyUpsampling() { return true; }
     92#endif
     93
    8694namespace WebCore {
    8795
     
    307315            // of progressive JPEG.
    308316            m_info.dct_method = dctMethod();
    309             m_info.dither_mode = JDITHER_FS;
    310             m_info.do_fancy_upsampling = true;
     317            m_info.dither_mode = ditherMode();
     318            m_info.do_fancy_upsampling = doFancyUpsampling();
    311319            m_info.enable_2pass_quant = false;
    312320            m_info.do_block_smoothing = true;
Note: See TracChangeset for help on using the changeset viewer.