Bug 227575 - [Cairo] Simplify GraphicsContextCairo creation
Summary: [Cairo] Simplify GraphicsContextCairo creation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, InRadar
Depends on:
Blocks:
 
Reported: 2021-07-01 02:14 PDT by Carlos Garcia Campos
Modified: 2021-07-06 14:30 PDT (History)
4 users (show)

See Also:


Attachments
Patch (18.37 KB, patch)
2021-07-01 02:16 PDT, Carlos Garcia Campos
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (18.69 KB, patch)
2021-07-01 02:41 PDT, Carlos Garcia Campos
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (18.61 KB, patch)
2021-07-01 02:50 PDT, Carlos Garcia Campos
zdobersek: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2021-07-01 02:14:09 PDT
Remove the constructors taking a PlatformContextCairo and add two that receive a RefPtr<cairo_t>&& and cairo_surface_t*. In both cases the PlatformContextCairo is created, so it's now always owned and callers don't need to create it.
Comment 1 Carlos Garcia Campos 2021-07-01 02:16:42 PDT
Created attachment 432670 [details]
Patch
Comment 2 Carlos Garcia Campos 2021-07-01 02:41:44 PDT
Created attachment 432672 [details]
Patch
Comment 3 Carlos Garcia Campos 2021-07-01 02:50:48 PDT
Created attachment 432673 [details]
Patch
Comment 4 Carlos Garcia Campos 2021-07-01 03:35:16 PDT
Committed r279460 (239316@main): <https://commits.webkit.org/239316@main>
Comment 5 Radar WebKit Bug Importer 2021-07-01 03:36:17 PDT
<rdar://problem/80015368>
Comment 6 Fujii Hironori 2021-07-05 22:55:12 PDT
Comment on attachment 432673 [details]
Patch

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

Very nice refactoring. We no longer need PlatformContextCairo. We can merge PlatformContextCairo into GraphicsContextCairo.

> Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp:76
> +    : GraphicsContextCairo(platformContext->cr())

Umm, this is not same with the original code. But, I think no problem.
Comment 7 Fujii Hironori 2021-07-06 14:30:54 PDT
(In reply to Fujii Hironori from comment #6)
> Very nice refactoring. We no longer need PlatformContextCairo. We can merge
> PlatformContextCairo into GraphicsContextCairo.

Filed: Bug 227721 – [Cairo] Merge PlatformContextCairo into GraphicsContextCairo