Bug 235467 - [GPU Process] Add the class 'SourceImage' to represent variants of image
Summary: [GPU Process] Add the class 'SourceImage' to represent variants of image
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks: 232411
  Show dependency treegraph
 
Reported: 2022-01-21 20:02 PST by Said Abou-Hallawa
Modified: 2022-01-22 17:05 PST (History)
15 users (show)

See Also:


Attachments
Patch (35.75 KB, patch)
2022-01-21 20:34 PST, Said Abou-Hallawa
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (35.93 KB, patch)
2022-01-21 20:48 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (38.51 KB, patch)
2022-01-21 21:57 PST, Said Abou-Hallawa
heycam: review+
Details | Formatted Diff | Diff
Patch (38.50 KB, patch)
2022-01-22 02:09 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2022-01-21 20:02:04 PST
FEImage has already an std::variant named 'SourceImage' to represent variants of image. The Pattern needs a similar structure; see bug 232411. So the plan is replace FEImage::SourceImage with the new class. Then make bug 232411 uses it as well.
Comment 1 Said Abou-Hallawa 2022-01-21 20:34:58 PST
Created attachment 449719 [details]
Patch
Comment 2 Said Abou-Hallawa 2022-01-21 20:48:25 PST
Created attachment 449720 [details]
Patch
Comment 3 Said Abou-Hallawa 2022-01-21 21:57:40 PST
Created attachment 449722 [details]
Patch
Comment 4 Cameron McCormack (:heycam) 2022-01-21 23:34:56 PST
Comment on attachment 449722 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Before the existence of GPUProces we used to make some drawing on an 

"GPUProcess"

s/make some drawing/do some drawing/

> Source/WebCore/ChangeLog:10
> +        NativeImage. With GPUProces, this will require bouncing the NativeImage 

"GPUProcess"

> Source/WebCore/ChangeLog:11
> +        between WebPorcess and GPUProcess at least two times. To make this scenario 

"WebProcess"

> Source/WebCore/ChangeLog:12
> +        efficient, a new class called SourceImage' will be introduced. The purpose

Stray (or missing) apostrophe.

> Source/WebCore/platform/graphics/SourceImage.cpp:74
> +    auto imageBuffer = ImageBuffer::create(nativeImage->size(), RenderingMode::Unaccelerated, 1, DestinationColorSpace::SRGB(), PixelFormat::BGRA8);

If canvas patterns will use this class, then they'll need a way to specify the color space when creating the ImageBuffer, so that we don't always convert to sRGB.
Comment 5 Said Abou-Hallawa 2022-01-22 02:09:14 PST
Created attachment 449728 [details]
Patch
Comment 6 EWS 2022-01-22 17:04:48 PST
Committed r288412 (246303@main): <https://commits.webkit.org/246303@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449728 [details].
Comment 7 Radar WebKit Bug Importer 2022-01-22 17:05:26 PST
<rdar://problem/87931919>