Bug 179888 - [Cairo] drawNativeImage(), drawPattern() in CairoOperations should operate directly with cairo_surface_t objects
Summary: [Cairo] drawNativeImage(), drawPattern() in CairoOperations should operate di...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-20 08:53 PST by Zan Dobersek
Modified: 2017-11-21 05:39 PST (History)
3 users (show)

See Also:


Attachments
Patch (9.69 KB, patch)
2017-11-20 09:01 PST, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2017-11-20 08:53:41 PST
[Cairo] drawNativeImage(), drawPattern() in CairoOperations should operate directly with cairo_surface_t objects
Comment 1 Zan Dobersek 2017-11-20 09:01:10 PST
Created attachment 327365 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-11-21 01:26:09 PST
Comment on attachment 327365 [details]
Patch

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

> Source/WebCore/platform/graphics/cairo/CairoOperations.h:96
> -void drawGlyphs(GraphicsContext&, const GraphicsContextState&, bool, const FloatPoint&, cairo_scaled_font_t*, double, const Vector<cairo_glyph_t>&, float, GraphicsContext&);
> +void drawGlyphs(PlatformContextCairo&, const GraphicsContextState&, const FloatPoint&, cairo_scaled_font_t*, double, const Vector<cairo_glyph_t>&, float, GraphicsContext&);

Is this related to this change? I'm surprised it builds.
Comment 3 Zan Dobersek 2017-11-21 05:33:02 PST
Comment on attachment 327365 [details]
Patch

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

>> Source/WebCore/platform/graphics/cairo/CairoOperations.h:96
>> +void drawGlyphs(PlatformContextCairo&, const GraphicsContextState&, const FloatPoint&, cairo_scaled_font_t*, double, const Vector<cairo_glyph_t>&, float, GraphicsContext&);
> 
> Is this related to this change? I'm surprised it builds.

It's not directly related, just an opportunistic fix.

It still builds because of the unified sources build. As it stands, there are essentially two drawGlyphs() overloads, but this one isn't defined, which isn't a problem because it doesn't get used. But because the CairoOperations.cpp file is included in the single unified source .cpp file before GraphicsContextCairo.cpp, the correct drawGlyphs() function is properly defined, and the build doesn't break.
Comment 4 Zan Dobersek 2017-11-21 05:37:10 PST
Comment on attachment 327365 [details]
Patch

Clearing flags on attachment: 327365

Committed r225077: <https://trac.webkit.org/changeset/225077>
Comment 5 Zan Dobersek 2017-11-21 05:37:15 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-11-21 05:39:19 PST
<rdar://problem/35656656>