Bug 41308 - Cairo: Need to implement GraphicsContext::clipConvexPolygon()
Summary: Cairo: Need to implement GraphicsContext::clipConvexPolygon()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 41732
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-28 15:02 PDT by Beth Dakin
Modified: 2010-07-29 23:45 PDT (History)
3 users (show)

See Also:


Attachments
Add support for clipConvexPolygon and enable path based borders (219.76 KB, patch)
2010-07-28 18:38 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch which preserves antialias and fill rules (219.98 KB, patch)
2010-07-29 13:51 PDT, Martin Robinson
krit: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>