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+

Beth Dakin
Reported 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.
Attachments
Add support for clipConvexPolygon and enable path based borders (219.76 KB, patch)
2010-07-28 18:38 PDT, Martin Robinson
no flags
Patch which preserves antialias and fill rules (219.98 KB, patch)
2010-07-29 13:51 PDT, Martin Robinson
krit: review+
Martin Robinson
Comment 1 2010-07-28 18:38:53 PDT
Created attachment 62910 [details] Add support for clipConvexPolygon and enable path based borders
Dirk Schulze
Comment 2 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?
Martin Robinson
Comment 3 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!
Martin Robinson
Comment 4 2010-07-29 13:51:34 PDT
Created attachment 62987 [details] Patch which preserves antialias and fill rules
Dirk Schulze
Comment 5 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.
Martin Robinson
Comment 6 2010-07-29 23:45:04 PDT
Note You need to log in before you can comment on or make changes to this bug.