<?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>64237</bug_id>
          
          <creation_ts>2011-07-10 05:10:03 -0700</creation_ts>
          <short_desc>[Skia] SVGMask fails on transformations</short_desc>
          <delta_ts>2013-04-09 13:01:57 -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>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dirk Schulze">krit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>caryclark</cc>
    
    <cc>guanqun.lu</cc>
    
    <cc>pkasting</cc>
    
    <cc>schenney</cc>
    
    <cc>sky</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>434545</commentid>
    <comment_count>0</comment_count>
      <attachid>100222</attachid>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2011-07-10 05:10:03 -0700</bug_when>
    <thetext>Created attachment 100222
Mask on object that gets skewed

SVGMask fails on transformations, independent what gets transformed. This is caused by our transformation algorithm in WebCore/rendering/SVGImageBufferTools.cpp/.h. We draw the content of a mask into a new ImageBuffer. This ImageBuffer is used as a mask. To prevent any pixelation, we draw the mask in the screen space instead of the userspace of the target. Means we transform the CTM of the ImageBuffer context to the transformation base that is visible on the screen before drawing the mask content. That forces us to transform the CTM of our canvas to the screens CTM as well during the masking operation and unapply the CTM transformation afterwards. For some reason this doesn&apos;t work on Skia quite well. I attached an example. In this example the mask gets skewed by 22.5 degree. On Skia the skewing is 45 degree. Looks like the transformation that is used to change from user space to screen space gets applied twice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>434546</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2011-07-10 05:11:51 -0700</bug_when>
    <thetext>Adding author of Skias clipToImageBuffer code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>459102</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2011-08-30 12:51:01 -0700</bug_when>
    <thetext>I&apos;ll try to catch the problem once I got chromium skis working on Mac.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>100222</attachid>
            <date>2011-07-10 05:10:03 -0700</date>
            <delta_ts>2011-07-10 05:10:03 -0700</delta_ts>
            <desc>Mask on object that gets skewed</desc>
            <filename>svg-mask.svg</filename>
            <type>image/svg+xml</type>
            <size>322</size>
            <attacher name="Dirk Schulze">krit</attacher>
            
              <data encoding="base64">PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRw
Oi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KPGRlZnM+CjxtYXNrIGlkPSJtYXNrIiBtYXNrQ29u
dGVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCI+CiAgICA8Y2lyY2xlIGN4PSIuNTAiIGN5PSIu
NTAiIHI9Ii41MCIgZmlsbD0id2hpdGUiLz4KPC9tYXNrPgo8L2RlZnM+CjxnIHRyYW5zZm9ybT0i
c2tld1goMjIuNSkiPgo8cmVjdCB3aWR0aD0iMTAwcHgiIGhlaWdodD0iMTAwcHgiIGZpbGw9Imdy
ZWVuIiBtYXNrPSJ1cmwoI21hc2spIi8+CjwvZz4KPC9zdmc+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>