Bug 209071 - [GPU Process] GraphicsContextStateChange::apply() should process ShadowsIgnoreTransformsChange before processing ShadowChange
Summary: [GPU Process] GraphicsContextStateChange::apply() should process ShadowsIgnor...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-13 11:53 PDT by Said Abou-Hallawa
Modified: 2020-03-13 18:29 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.36 KB, patch)
2020-03-13 11:55 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
test case (523 bytes, text/html)
2020-03-13 11:58 PDT, Said Abou-Hallawa
no flags Details
Patch (2.83 KB, patch)
2020-03-13 15:32 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 Said Abou-Hallawa 2020-03-13 11:53:28 PDT
This because GraphicsContext::setPlatformShadow() checks the value of m_state.shadowsIgnoreTransforms. GraphicsContext::setPlatformShadow() is called from GraphicsContextStateChange::apply() via setLegacyShadow() or setShadow() when it detects a ShadowChange.
Comment 1 Said Abou-Hallawa 2020-03-13 11:55:53 PDT
Created attachment 393512 [details]
Patch
Comment 2 Said Abou-Hallawa 2020-03-13 11:58:36 PDT
Created attachment 393514 [details]
test case
Comment 3 Said Abou-Hallawa 2020-03-13 12:06:11 PDT
Repro steps:

1. Launch mini-browser
2. Enable "Settings/Internal Features/Render Canvas in GPU Process" or "Settings/Enable Display List Drawing".
3. Open the attached test case

Result: the test case shows a 100x100 green rectangle
Expected: the test case shows a 100x100 green rectangle with its shadow 100x100 red rectangle
Comment 4 Said Abou-Hallawa 2020-03-13 12:08:24 PDT
This patch fixes the following test cases when running "run-webkit-tests --internal-feature RenderCanvasInGPUProcessEnabled"

fast/canvas/canvas-image-shadow.html
fast/canvas/canvas-scale-drawImage-shadow.html
fast/canvas/canvas-scale-fillPath-shadow.html
fast/canvas/canvas-scale-fillRect-shadow.html
fast/canvas/canvas-scale-shadowBlur.html
fast/canvas/canvas-transforms-fillRect-shadow.html
fast/canvas/fillText-shadow.html
Comment 5 Darin Adler 2020-03-13 12:24:58 PDT
(In reply to Said Abou-Hallawa from comment #4)
> This patch fixes the following test cases when running "run-webkit-tests
> --internal-feature RenderCanvasInGPUProcessEnabled"
> 
> fast/canvas/canvas-image-shadow.html
> fast/canvas/canvas-scale-drawImage-shadow.html
> fast/canvas/canvas-scale-fillPath-shadow.html
> fast/canvas/canvas-scale-fillRect-shadow.html
> fast/canvas/canvas-scale-shadowBlur.html
> fast/canvas/canvas-transforms-fillRect-shadow.html
> fast/canvas/fillText-shadow.html

Change log should mention this.
Comment 6 Said Abou-Hallawa 2020-03-13 15:32:20 PDT
Created attachment 393540 [details]
Patch
Comment 7 WebKit Commit Bot 2020-03-13 18:28:03 PDT
Comment on attachment 393540 [details]
Patch

Clearing flags on attachment: 393540

Committed r258454: <https://trac.webkit.org/changeset/258454>
Comment 8 WebKit Commit Bot 2020-03-13 18:28:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2020-03-13 18:29:14 PDT
<rdar://problem/60442640>