<?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>74600</bug_id>
          
          <creation_ts>2011-12-15 04:29:57 -0800</creation_ts>
          <short_desc>[Qt] Graphics are pixelated after scaling/rotating</short_desc>
          <delta_ts>2013-04-11 09:21:47 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>113405</dependson>
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Magnesus">magnesus2</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>allan.jensen</cc>
    
    <cc>ivan4th</cc>
    
    <cc>magnesus2</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>521822</commentid>
    <comment_count>0</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2011-12-15 04:29:57 -0800</bug_when>
    <thetext>Transforming images in QtWebKit from Qt 4.8.0 (QtWebKit 2.2.1) gives a pixelated image that after a second switches to smooth version. It looks very bad.
It&apos;s on Windows XP using Qt 4.8.0. Steps to reproduce: scale a PNG image in img tag. Watch how it behaves after scaling.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>521823</commentid>
    <comment_count>1</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2011-12-15 04:31:17 -0800</bug_when>
    <thetext>The same graphics are always smoothly transformer with the same settings on Qt 4.7.0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>523277</commentid>
    <comment_count>2</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2011-12-17 01:02:04 -0800</bug_when>
    <thetext>*smoothly transformed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536390</commentid>
    <comment_count>3</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2012-01-16 00:09:17 -0800</bug_when>
    <thetext>Will this be resolved soon? I have to decide if to stick with Qt or change to sth different because of this issue.

More info: When transforming - rotating, scaling or even moving PNG images in QtWebKit they are pixelated for a long while and then suddently they are smooth.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>549790</commentid>
    <comment_count>4</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2012-02-06 00:38:32 -0800</bug_when>
    <thetext>Still present in latest Qt4.8.0 (QtWebKit.dll has 4.9.0 version).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>549804</commentid>
    <comment_count>5</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2012-02-06 00:52:22 -0800</bug_when>
    <thetext>Here is a before, after image: http://wieza.iq.pl/beforeafter.png (left: when the image is moving, right: half a second after it stops).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>549808</commentid>
    <comment_count>6</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2012-02-06 01:05:12 -0800</bug_when>
    <thetext>I also found this bug reports:
https://bugs.webkit.org/show_bug.cgi?id=41036
http://codereview.chromium.org/2881020/show

Maybe they are related?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>549809</commentid>
    <comment_count>7</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2012-02-06 01:06:02 -0800</bug_when>
    <thetext>http://code.google.com/p/chromium/issues/detail?id=55495</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>557958</commentid>
    <comment_count>8</comment_count>
    <who name="Magnesus">magnesus2</who>
    <bug_when>2012-02-16 00:15:44 -0800</bug_when>
    <thetext>Does anyone even read these?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>649062</commentid>
    <comment_count>9</comment_count>
      <attachid>147551</attachid>
    <who name="Ivan Shvedunov">ivan4th</who>
    <bug_when>2012-06-14 04:23:10 -0700</bug_when>
    <thetext>Created attachment 147551
workaround (patch)

I was affected by that problem too. When using sprite-based
animation (rapidly changing backgrounds) the animated image
becomes pixelated during frame changes. I&apos;ve changed
GraphicsContextQt.cpp so it always uses
QPainter::SmoothPixmapTransform. After that change the problem
with non-smooth scaling disappeared and I didn&apos;t notice
any performance hit. Your mileage may vary though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>649063</commentid>
    <comment_count>10</comment_count>
    <who name="Ivan Shvedunov">ivan4th</who>
    <bug_when>2012-06-14 04:25:48 -0700</bug_when>
    <thetext>Note that my patch isn&apos;t meant for inclusion in QtWebKit, it&apos;s
just a temporary fix for the problem (thus it comments
out some lines).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>864409</commentid>
    <comment_count>11</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-03-27 04:44:43 -0700</bug_when>
    <thetext>This sounds like intentional behavior. Using low interpolation during animations, and high when it is finished. That is done for performance reasons.

To avoid this, you need accelerated compositing which is enabled by default in Qt 5 and QtWebKit 2.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>864503</commentid>
    <comment_count>12</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-03-27 07:06:48 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; This sounds like intentional behavior. Using low interpolation during animations, and high when it is finished. That is done for performance reasons.
&gt; 
&gt; To avoid this, you need accelerated compositing which is enabled by default in Qt 5 and QtWebKit 2.3.

Forget that. I am going to make it configurable, see bug 113405.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>873867</commentid>
    <comment_count>13</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-04-11 09:21:47 -0700</bug_when>
    <thetext>With the fix for bug #113405 landed. I will consider the issue fixed. 

The current default behavior is working as designed, and can now be disabled with image-rendering: optimizeQuality (or image-rendering: smooth as it will be called in CSS4 Images when that gets activated).</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>147551</attachid>
            <date>2012-06-14 04:23:10 -0700</date>
            <delta_ts>2012-06-14 04:23:10 -0700</delta_ts>
            <desc>workaround (patch)</desc>
            <filename>webkit-image-quality-workaround-patch.diff</filename>
            <type>text/plain</type>
            <size>2065</size>
            <attacher name="Ivan Shvedunov">ivan4th</attacher>
            
              <data encoding="base64">LS0tIC4vc3JjLzNyZHBhcnR5L3dlYmtpdC9Tb3VyY2UvV2ViQ29yZS9wbGF0Zm9ybS9ncmFwaGlj
cy9xdC9HcmFwaGljc0NvbnRleHRRdC5jcHAub3JpZwkyMDEyLTA2LTE0IDE0OjU2OjM1LjMyMTkx
Njg3MyArMDQwMAorKysgLi9zcmMvM3JkcGFydHkvd2Via2l0L1NvdXJjZS9XZWJDb3JlL3BsYXRm
b3JtL2dyYXBoaWNzL3F0L0dyYXBoaWNzQ29udGV4dFF0LmNwcAkyMDEyLTA2LTEzIDIzOjA0OjM3
LjIzMzA0Nzc4NiArMDQwMApAQCAtMjQzLDYgKzI0Myw3IEBACiAgICAgaW5pdGlhbFNtb290aFBp
eG1hcFRyYW5zZm9ybUhpbnQgPSBwYWludGVyLT50ZXN0UmVuZGVySGludChRUGFpbnRlcjo6U21v
b3RoUGl4bWFwVHJhbnNmb3JtKTsKIAogICAgIHBhaW50ZXItPnNldFJlbmRlckhpbnQoUVBhaW50
ZXI6OkFudGlhbGlhc2luZywgdHJ1ZSk7CisgICAgcGFpbnRlci0+c2V0UmVuZGVySGludChRUGFp
bnRlcjo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</attachment>
      

    </bug>

</bugzilla>