<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>103749</bug_id>
          
          <creation_ts>2012-11-30 07:54:12 -0800</creation_ts>
          <short_desc>ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Should use TURBO_JPEG_RGB_SWIZZLE fast path for non-scaled images</short_desc>
          <delta_ts>2012-12-03 07:48:57 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>98878</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yong Li">yong.li.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>kbr</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>noel.gordon</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>780119</commentid>
    <comment_count>0</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-11-30 07:54:12 -0800</bug_when>
    <thetext>There is currently following line #if !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) &amp;&amp; defined(TURBO_JPEG_RGB_SWIZZLE) in JPEGImaggeDecoder.cpp. The reason of this !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) check is we cannot do swizzling when the buffer wants a down-sampled image. However this doesn&apos;t work. As there is no such check when it sets the colorspace. If you enable both IMAGE_DECODER_DOWN_SAMPLING and TURBO_JPEG_RGB_SWIZZLE, it will crash for sure.

ENABLE(IMAGE_DECODER_DOWN_SAMPLING) is probably not widely used, and could be improved. However, I found it super easy to make TURBO_JPEG_RGB_SWIZZLE work with it, so why not?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>780207</commentid>
    <comment_count>1</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-11-30 10:30:25 -0800</bug_when>
    <thetext>seems the crash has been fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>780223</commentid>
    <comment_count>2</comment_count>
      <attachid>176995</attachid>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-11-30 10:45:47 -0800</bug_when>
    <thetext>Created attachment 176995
the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>780296</commentid>
    <comment_count>3</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-11-30 12:18:57 -0800</bug_when>
    <thetext>+Recent JPEGImageDecoder reviewers and Antonio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>780300</commentid>
    <comment_count>4</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-11-30 12:20:19 -0800</bug_when>
    <thetext>This is safe since http://trac.webkit.org/changeset/131075.

(See bug 98878)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>780375</commentid>
    <comment_count>5</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2012-11-30 13:37:21 -0800</bug_when>
    <thetext>Noel: could you unofficially review this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>780673</commentid>
    <comment_count>6</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2012-11-30 23:15:48 -0800</bug_when>
    <thetext>Thank you Yong Li. Looks good to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>780674</commentid>
    <comment_count>7</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2012-11-30 23:18:36 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; seems the crash has been fixed.

Yes. Fixed on bug 98878.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>781443</commentid>
    <comment_count>8</comment_count>
      <attachid>176995</attachid>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-12-03 07:43:34 -0800</bug_when>
    <thetext>Comment on attachment 176995
the patch

LGTM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>781450</commentid>
    <comment_count>9</comment_count>
      <attachid>176995</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-12-03 07:48:54 -0800</bug_when>
    <thetext>Comment on attachment 176995
the patch

Clearing flags on attachment: 176995

Committed r136401: &lt;http://trac.webkit.org/changeset/136401&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>781451</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-12-03 07:48:57 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>176995</attachid>
            <date>2012-11-30 10:45:47 -0800</date>
            <delta_ts>2012-12-03 07:48:53 -0800</delta_ts>
            <desc>the patch</desc>
            <filename>103749.patch</filename>
            <type>text/plain</type>
            <size>1776</size>
            <attacher name="Yong Li">yong.li.webkit</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBiZTQ5Mzc2Li4xNTU5ZTI2IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKys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