Bug 47076 - [cairo] Move some cairo functions to the CairoUtilities
Summary: [cairo] Move some cairo functions to the CairoUtilities
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 45902
  Show dependency treegraph
Reported: 2010-10-04 03:25 PDT by Alejandro G. Castro
Modified: 2010-10-04 08:25 PDT (History)
1 user (show)

See Also:

Proposed patch (12.62 KB, patch)
2010-10-04 04:13 PDT, Alejandro G. Castro
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro G. Castro 2010-10-04 03:25:01 PDT
We need to move some cairo functions to the CairoUtilities so we can use them outside GraphicsContextCairo.
Comment 1 Alejandro G. Castro 2010-10-04 04:13:48 PDT
Created attachment 69613 [details]
Proposed patch
Comment 2 Martin Robinson 2010-10-04 07:54:44 PDT
Comment on attachment 69613 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=69613&action=review

Looks great! Please fix the following small issues before landing though.

> WebCore/platform/graphics/cairo/CairoUtilities.cpp:73
> +// We apply the pending path built via addPath to the Cairo context
> +// lazily. This prevents interaction between the path and other routines
> +// such as fillRect.

This comment doesn't make quite as much sense now that this function is shared between different source files. It's probably safe just to remove it.

> WebCore/platform/graphics/cairo/CairoUtilities.cpp:122
> +void drawPatternCairo(cairo_t* cr, cairo_surface_t* image, const IntSize& imageSize, const FloatRect& tileRect,

I think it you should call this drawPatternToCairoContext to match the name of the other helper functions.
Comment 3 Alejandro G. Castro 2010-10-04 08:25:13 PDT
Landed with the suggested modifications http://trac.webkit.org/changeset/69015