Bug 41308

Summary: Cairo: Need to implement GraphicsContext::clipConvexPolygon()
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, krit, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 41732    
Bug Blocks:    
Attachments:
Description Flags
Add support for clipConvexPolygon and enable path based borders
none
Patch which preserves antialias and fill rules krit: review+

Description Beth Dakin 2010-06-28 15:02:08 PDT
http://trac.webkit.org/changeset/62035 introduced a new method of drawing border-radius using paths. Right now, this new code is only enabled for some platforms. To enable the new and much improved code for Cairo, GraphicsContext::clipConvexPolygon() needs to be implemented, and then Cairo should be added to the list of platforms that set #define HAVE_PATH_BASED_BORDER_RADIUS_DRAWING in RenderObject.h

I would like to note that Cairo already has a function implemented called GraphicsContext::drawConvexPolygon(). So hopefully it is straightforward to use some of that same logic for clipping instead of drawing.
Comment 1 Martin Robinson 2010-07-28 18:38:53 PDT
Created attachment 62910 [details]
Add support for clipConvexPolygon and enable path based borders
Comment 2 Dirk Schulze 2010-07-29 03:39:01 PDT
Great patch. Just one question, you change fillRule and antialiasing settings of the context in clipConvexPolygon, should they be restored to the previos settings, or is this not neccessary?
Comment 3 Martin Robinson 2010-07-29 13:51:20 PDT
You're right. I was doing that, but at some point that change was lost. I've re-added it. Thanks!
Comment 4 Martin Robinson 2010-07-29 13:51:34 PDT
Created attachment 62987 [details]
Patch which preserves antialias and fill rules
Comment 5 Dirk Schulze 2010-07-29 14:24:08 PDT
Comment on attachment 62987 [details]
Patch which preserves antialias and fill rules

LGTM. r=me. Well done! :-) These were the first pixel results I reviewed for the Cairo ports.
Comment 6 Martin Robinson 2010-07-29 23:45:04 PDT
Committed r64338: <http://trac.webkit.org/changeset/64338>