[Webkit-unassigned] [Bug 61560] Canvas performance regression with `clip`

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 3 02:38:39 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=61560


Dirk Schulze <krit at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
                 CC|                            |krit at webkit.org




--- Comment #5 from Dirk Schulze <krit at webkit.org>  2014-04-03 02:38:58 PST ---
(In reply to comment #4)
> The clipping path intersection is not being detected by CGContextClip nor CGContextEOClip it would seem.  Surrounding the CG clip w/ save/restore graphics state certainly does fix the issue.  Bug in CG?
> 
> GraphicsContextCG.cpp
> @@ -1095,13 +1095,15 @@ void GraphicsContext::clip(const Path& path)
> 
>      // CGContextClip does nothing if the path is empty, so in this case, we
>      // instead clip against a zero rect to reduce the clipping region to
>      // nothing - which is the intended behavior of clip() if the path is empty.
>      if (path.isEmpty())
>          CGContextClipToRect(context, CGRectZero);
>      else {
> +        CGContextSaveGState(context);
>          CGContextBeginPath(context);
>          CGContextAddPath(context, path.platformPath());
>          CGContextClip(context);
> +        CGContextRestoreGState(context);
>      }
>      m_data->clip(path);
>  }

This is incorrect. The path should not be cleared after clipping.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list