Changeset 140091 in webkit


Ignore:
Timestamp:
Jan 17, 2013 7:23:28 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Update GraphicsContext to support winding rule in clip operator for Cairo
https://bugs.webkit.org/show_bug.cgi?id=107065

Patch by Rik Cabanier <cabanier@adobe.com> on 2013-01-17
Reviewed by Dirk Schulze.

Added support for winding to clip() and canvasClip() functions.

No new tests, no change in behavior.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::clip): Use passed in winding rule.
(WebCore::GraphicsContext::canvasClip): Rename variable.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140090 r140091  
     12013-01-17  Rik Cabanier  <cabanier@adobe.com>
     2
     3        Update GraphicsContext to support winding rule in clip operator for Cairo
     4        https://bugs.webkit.org/show_bug.cgi?id=107065
     5
     6        Reviewed by Dirk Schulze.
     7
     8        Added support for winding to clip() and canvasClip() functions.
     9
     10        No new tests, no change in behavior.
     11
     12        * platform/graphics/cairo/GraphicsContextCairo.cpp:
     13        (WebCore::GraphicsContext::clip): Use passed in winding rule.
     14        (WebCore::GraphicsContext::canvasClip): Rename variable.
     15
    1162013-01-17  Elliott Sprehn  <esprehn@chromium.org>
    217
  • trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp

    r139967 r140091  
    998998}
    999999
    1000 // FIXME: don't ignore the winding rule. https://bugs.webkit.org/show_bug.cgi?id=107065
    1001 void GraphicsContext::clip(const Path& path, WindRule)
     1000void GraphicsContext::clip(const Path& path, WindRule windRule)
    10021001{
    10031002    if (paintingDisabled())
     
    10111010    }
    10121011    cairo_fill_rule_t savedFillRule = cairo_get_fill_rule(cr);
    1013     cairo_set_fill_rule(cr, CAIRO_FILL_RULE_WINDING);
     1012    if (windRule == RULE_NONZERO)
     1013        cairo_set_fill_rule(cr, CAIRO_FILL_RULE_WINDING);
     1014    else
     1015        cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
    10141016    cairo_clip(cr);
    10151017    cairo_set_fill_rule(cr, savedFillRule);
     
    10171019}
    10181020
    1019 void GraphicsContext::canvasClip(const Path& path, WindRule fillRule)
    1020 {
    1021     clip(path, fillRule);
     1021void GraphicsContext::canvasClip(const Path& path, WindRule windRule)
     1022{
     1023    clip(path, windRule);
    10221024}
    10231025
Note: See TracChangeset for help on using the changeset viewer.