Bug 236924 - [GPU Process] Text filled with pattern sometimes draw with incorrect color
Summary: [GPU Process] Text filled with pattern sometimes draw with incorrect color
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Process Model (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks: 233914 236508
  Show dependency treegraph
 
Reported: 2022-02-19 22:00 PST by Jon Lee
Modified: 2022-05-13 15:12 PDT (History)
5 users (show)

See Also:


Attachments
Patch (6.05 KB, patch)
2022-03-29 14:56 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (6.79 KB, patch)
2022-04-04 11:40 PDT, Said Abou-Hallawa
mmaxfield: review+
Details | Formatted Diff | Diff
Patch (6.87 KB, patch)
2022-04-06 01:08 PDT, 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 Jon Lee 2022-02-19 22:00:55 PST
imported/mozilla/svg/linearGradient-basic-03.svg [ ImageOnlyFailure ]
imported/mozilla/svg/pattern-transformed-01.svg [ ImageOnlyFailure ]
svg/gradients/gradient-flipped-start-end-points.svg [ ImageOnlyFailure ]
svg/gradients/spreadMethod.svg [ ImageOnlyFailure ]
svg/gradients/spreadMethodAlpha.svg [ ImageOnlyFailure ]
svg/gradients/spreadMethodDiagonal.svg [ ImageOnlyFailure ]
svg/gradients/spreadMethodDiagonal2.svg [ ImageOnlyFailure ]
svg/gradients/spreadMethodDiagonal3.svg [ ImageOnlyFailure ]
svg/gradients/spreadMethodDiagonal4.svg [ ImageOnlyFailure ]
svg/gradients/spreadMethodDuplicateStop.svg [ ImageOnlyFailure ]
svg/gradients/spreadMethodReversed.svg [ ImageOnlyFailure ]
svg/gradients/stopAlpha.svg [ ImageOnlyFailure ]
svg/transforms/transformed-text-fill-gradient.html [ ImageOnlyFailure ]
svg/transforms/transformed-text-fill-pattern.html [ ImageOnlyFailure ]
Comment 1 Radar WebKit Bug Importer 2022-02-19 22:01:15 PST
<rdar://problem/89196811>
Comment 2 Jon Lee 2022-03-14 23:33:48 PDT
The patch for bug 237728 resolves imported/mozilla/svg/linearGradient-basic-03.svg and svg/gradients/gradient-flipped-start-end-points.svg, and svg/transforms/transformed-text-fill-pattern.html turns into a crash.
Comment 3 Said Abou-Hallawa 2022-03-29 14:56:16 PDT
Created attachment 456066 [details]
Patch
Comment 4 Said Abou-Hallawa 2022-04-04 11:40:32 PDT
Created attachment 456596 [details]
Patch
Comment 5 Myles C. Maxfield 2022-04-05 13:18:22 PDT
Comment on attachment 456596 [details]
Patch

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

> Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:152
> +        return;

Can we at least set it to a hardcoded color in this case? So it doesn't get filled with some random previously-used color?

> Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:164
> +        return;

Ditto.
Comment 6 Myles C. Maxfield 2022-04-05 13:20:44 PDT
Comment on attachment 456596 [details]
Patch

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

>> Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:152
>> +        return;
> 
> Can we at least set it to a hardcoded color in this case? So it doesn't get filled with some random previously-used color?

Actually, maybe it's better to ASSERT() the return of CGColorGetPattern() is equal to the pattern that was set on the context before recording any glyphs.
Comment 7 Said Abou-Hallawa 2022-04-06 01:08:01 PDT
Created attachment 456788 [details]
Patch
Comment 8 EWS 2022-04-06 10:58:45 PDT
Committed r292478 (249329@main): <https://commits.webkit.org/249329@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 456788 [details].