Bug 227575

Summary: [Cairo] Simplify GraphicsContextCairo creation
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, Hironori.Fujii, webkit-bug-importer, zdobersek
Priority: P2 Keywords: Gtk, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch zdobersek: review+

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